foo1';
isnt $foo1->_dirty, true, 'foo1 is clean';
$foo2 = $foo1->foo;
is $foo2->id, 'FOO_2', 'got the right id foo2';
is $foo2->num, 2, 'got the right num foo2';
isnt $foo2->
>id, 'FOO_3', 'got the right id foo3';
is $foo3->num, 3, 'got the right num foo3';
isnt $foo3->_dirty, true, 'foo3 is clean';
lives_ok { $foo3_A = Foo->new ( asylum => $ASYL, id
t id foo3_A';
is $foo3_A->num, 3, 'got the right num foo3_A';
isnt $foo3_A->_dirty, true, 'foo3_A is clean';
isnt $foo3_A, $foo3, 'instances foo3_A != foo3'; # !!!
# because:
#
p, 0.5, 'oem is 0.1 sec';
#
###################################
isnt $ASYL->is_locked, true, 'default is not locked';
isnt $ASYL_OEM->is_locked, true, 'oem is not locked';
is $ASYL->lock
default unlocked';
is $ASYL_OEM->unlock, true, 'oem unlocked';
isnt $ASYL->is_locked, true, 'default is unlocked';
isnt $ASYL_OEM->is_locked, true, 'oem is unlocked';
is $ASYL->unlock,
e, 'default closed';
is $ASYL_OEM->close, true, 'oem closed';
isnt $ASYL->is_locked, true, 'default is unlocked';
isnt $ASYL_OEM->is_locked, true, 'oem is unlocked';
is $ASYL->close,
' ) ),
)
} 'Asylum with poor lock constructed';
isa ( $ASYL->_lock, 'Frost::Lock' );
isnt $ASYL->is_locked, true, 'Asylum is not locked';
is $ASYL->lock, true, 'Asylum locked';
is
s $ASYL->lock, true, 'Asylum re-locking ok';
is $ASYL->unlock, true, 'Asylum unlocked';
isnt $ASYL->is_locked, true, 'Asylum is unlocked';
is $ASYL->unlock, true, 'Asylum re-unlocking
d';
is $ASYL->open, true, 'Asylum re-open ok';
is $ASYL->close, true, 'Asylum closed';
isnt $ASYL->is_locked, true, 'Asylum is unlocked';
is $ASYL->close, true, 'Asylum re-closing o
ht->_maxcount, $default_maxcount, "got the right default twilight_maxcount $default_maxcount";
isnt $twilight->exists ( 'Foo', 42 ), true, 'spirit does not exist';
is $twilight->get ( 'Foo', 4
om the twilight zone";
cmp_deeply [ $foo ], [ $spirit ], 'removed the correct spirit of Foo';
isnt $twilight->exists ( 'Foo', $id ), true, 'spirit does not exist anymore';
is $twilight->get
o_id = 'foo' . $val;
my $bar_id = 'bar' . $val;
isnt $twilight->exists ( 'Foo', $foo_id ), true, "spirit $foo_id of Foo has gone";
isnt $twilight->exists ( 'Bar', $bar_id ), true, "
nces';
lives_ok { $essence_num = $cemetery_num->exhume ( 1 ); } 'exhume 1 from cemetery_num';
isnt $essence_num, 42, 'got no essence from cemetery_num';
lives_ok { $essence_num = $cemetery_nu
_num';
lives_ok { $essence_str = $cemetery_str->exhume ( 1 ); } 'exhume 1 from cemetery_str';
isnt $essence_str, 'Essence', 'got no essence from cemetery_str';
lives_ok { $essence_str = $cemete
emetery_num';
isnt $essence_num, 42, 'got no essence from cemetery_num';
lives_ok { $essence_str = $cemetery_str->exhume ( 1 ); } 'exhume 1 -> "Essence" from cemetery_str';
isnt $essence_str,
ylum )];
isnt $loop1n2, $loop2, 'got different references 2 N 1';
isnt $loop1l2, $loop2, 'got different references 2 L 1';
isnt $loop2n1, $loop1, 'got different references 1 N 2';
isnt $loop2l1,
asylum;
lives_ok { $asylum = Frost::Asylum->new ( data_root => $TMP_PATH ); } 'asylum created';
isnt $asylum->is_locked, true, 'asylum is NOT locked';
lives_ok { $asylum->lock; } 'asylum locked'
$asylum->is_locked, true, 'asylum is locked';
lives_ok { $asylum->unlock; } 'asylum unlocked';
isnt $asylum->is_locked, true, 'asylum is NOT locked';
lives_ok { $asylum->open; } 'asylum opened'
, 'asylum is locked';
lives_ok { $asylum->close; } 'asylum closed'; # save works as well...
isnt $asylum->is_locked, true, 'asylum is NOT locked';
lives_ok { $asylum->open } 'asylum opened'
k($article, 'Frost::Locum');
is($article->oid, $article_oid, '... got a oid for the article');
isnt($article_ref, "$article", '... got a new article instance');
is($article->headline,
'Home Off
k($article, 'Frost::Locum');
is($article->oid, $article_oid, '... got a oid for the article');
isnt($article_ref, "$article", '... got a new article instance');
is($article->headline,
'Home Off
article2, 'Frost::Locum');
is($article2->oid, $article2_oid, '... got a oid for the article');
isnt($article2_ref, "$article2", '... got a new article instance');
is($article2->headline,
'Compa
_file {};
check_ndx_file {};
isnt $necromancer->exists ( 'Foo', $id ), true, 'spirit id does not exist';
check_db_file { id => 1 };
check_ndx_file {};
isnt $necromancer->exists ( 'Foo',
$id, 'foo_num' ), true, 'spirit foo_num does not exist';
isnt $necromancer->exists ( 'Foo', $id, 'foo_str' ), true, 'spirit foo_str does not exist';
check_db_file { map { $_ => 1} qw( id foo_
,
'... parent and child have the same last name ('
. $parent->last_name
. ')' );
}
isnt( $orphan->last_name, $parent->last_name,
'... the orphan child does not have the same last nam
,
'... parent and child have the same last name ('
. $parent->last_name
. ')' );
}
isnt( $orphan->last_name, $parent->last_name,
'... the orphan child is not affected by changes in th
t name we stored' );
is( @{ $parent2->children }, 0, '... the parent has no own children' );
isnt( $orphan->last_name, $parent->last_name,
'... the orphan child was not affected by changes in t
=> 'text/plain' } );
my $header2 = $r->headers;
isa_ok( $header2, 'HTTP::Headers' );
isnt( $header, $header2, '... created a new HTTP::Header object' );
is( $header2->content_type, '
=> 'text/html' ] );
my $header3 = $r->headers;
isa_ok( $header3, 'HTTP::Headers' );
isnt( $header2, $header3, '... created a new HTTP::Header object' );
is( $header3->content_type,
pplication/pdf' ) );
my $header4 = $r->headers;
isa_ok( $header4, 'HTTP::Headers' );
isnt( $header3, $header4, '... created a new HTTP::Header object' );
is( $header4->content_type,
k_db_file {};
check_ndx_file {};
isnt $mortician->exists ( $id ), true, 'spirit id does not exist';
check_db_file { id => 1 };
check_ndx_file {};
isnt $mortician->exists ( $id, 'foo_num
' ), true, 'spirit foo_num does not exist';
isnt $mortician->exists ( $id, 'foo_str' ), true, 'spirit foo_str does not exist';
check_db_file { map { $_ => 1} qw( id foo_num foo_str ) };
check
'cemetery_foo exhume 102';
is $cemetery_foo->exhume ( 1, ), 101, 'cemetery_foo exhume 101';
isnt $cemetery_foo->exhume ( 42 ), 142, 'cemetery_foo exhume 142 fails';
is $cemetery_bar->ento
'cemetery_bar exhume 202';
is $cemetery_bar->exhume ( 1, ), 201, 'cemetery_bar exhume 201';
isnt $cemetery_bar->exhume ( 42 ), 242, 'cemetery_bar exhume 242 fails';
is $cemetery_foo->coun
lum constructed';
foreach my $id ( @IDS )
{
if ( ( $id == 1 ) or ( $id == $MAX_ID ) )
{
isnt $ASYL->exists ( 'Foo', $id ), true, "spirit $id burns in hell";
}
else
{
my $foo = Foo->
f the
# prototype
my $foo = Foo->new;
isa_ok($foo, 'Foo');
# the instance is *not* the prototype
isnt($foo, $foo_prototype, '... got a new instance of Foo');
# but it has the same values ...
is($foo
), $REST, "$REST spirits buried";
$REST = 0;
for ( 1..$MAX_ID )
{
if ( $_ % 2 )
{
isnt $ASYL->exists ( 'Foo', $_ ), true, "spirit $_ burns in hell";
}
else
{
my $foo;
live
), $REST, "$REST spirits buried";
$REST = 0;
for ( 1..$MAX_ID )
{
if ( $_ % 2 )
{
isnt $ASYL->exists ( 'Foo', $_ ), true, "spirit $_ burns in hell";
}
else
{
my $foo;
live
any
= Company->new( # from twilight...
asylum => $ASYL,
id => 'II',
);
isnt( $old_company->_dirty, true, 'II Company is clean' );
$old_company->employees([]);
is( $old
se::Meta::Class' );
can_ok( 'Point3D', 'meta' );
isa_ok( Point3D->meta, 'Moose::Meta::Class' );
isnt( Point->meta, Point3D->meta,
'... they are different metaclasses as well' );
# poke at Point
e