#!/usr/local/bin/perl -w
=head1 NAME
00branches.t - testing of VCP::Branches
=cut
use strict ;
use Carp ;
use Test ;
use VCP::Branch ;
use VCP::Branches ;
## TODO: Add lots of tests to 00branches.t
my $b ;
my @tests = (
sub { $b = VCP::Branches->new ; ok( ref $b, "VCP::Branches" ) },
sub { ok 0+$b->get, 0 },
sub {
$b->add( VCP::Branch->new( branch_id => "foo" ) );
ok 0+$b->get, 1;
},
sub {
$b->add( VCP::Branch->new( branch_id => "foo" ) );
ok 0+$b->get, 1;
},
sub {
$b->add( VCP::Branch->new( branch_id => "bar" ) );
ok 0+$b->get, 2;
},
) ;
plan tests => scalar( @tests ) ;
$_->() for @tests ;