07d77efdf55d76cf60ae5f3901fb0fc242095de0
[scpubgit/Object-Remote.git] / t / basic.t
1 use strictures 1;
2 use Test::More;
3
4 use Object::Remote::Connector::Local;
5 use Object::Remote;
6
7 $ENV{PERL5LIB} = join(
8   ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib t/lib)
9 );
10
11 my $connection = Object::Remote::Connector::Local->new->connect;
12
13 #$Object::Remote::Connection::DEBUG = 1;
14
15 my $remote = Object::Remote->new(
16   connection => $connection,
17   class => 'ORTestClass'
18 );
19
20 isnt($$, $remote->pid, 'Different pid on the other side');
21
22 is($remote->counter, 0, 'Counter at 0');
23
24 is($remote->increment, 1, 'Increment to 1');
25
26 is($remote->counter, 1, 'Counter at 1');
27
28 done_testing;