Release commit for 0.001001
[scpubgit/Object-Remote.git] / t / sender.t
CommitLineData
542d5b5c 1use strictures 1;
2use Test::More;
3
4use Object::Remote::Connector::Local;
5use Object::Remote;
6use Object::Remote::ModuleSender;
7
8$ENV{PERL5LIB} = join(
9 ':', ($ENV{PERL5LIB} ? $ENV{PERL5LIB} : ()), qw(lib)
10);
11
542d5b5c 12my $ms = Object::Remote::ModuleSender->new(
13 dir_list => [ 't/lib' ]
14);
15
03f41c0e 16my $connection = Object::Remote::Connector::Local->new(
17 module_sender => $ms,
18 )->connect;
542d5b5c 19
676438a1 20my $counter = Object::Remote->new(
542d5b5c 21 connection => $connection,
22 class => 'ORTestClass'
676438a1 23);
542d5b5c 24
676438a1 25isnt($$, $counter->pid, 'Different pid on the other side');
542d5b5c 26
676438a1 27is($counter->counter, 0, 'Counter at 0');
542d5b5c 28
676438a1 29is($counter->increment, 1, 'Increment to 1');
542d5b5c 30
676438a1 31is($counter->counter, 1, 'Counter at 1');
542d5b5c 32
33done_testing;