1 ## A test for adding crosses
2 ## Jeremy D. Edwards (jde22@cornell.edu) 2013
8 use Test::More tests=>10;
9 use SGN::Test::Fixture;
11 BEGIN {use_ok('CXGN::Pedigree::AddCrosses');}
12 BEGIN {use_ok('CXGN::DB::Connection');}
13 BEGIN {use_ok('Bio::GeneticRelationships::Pedigree');}
14 BEGIN {use_ok('Bio::GeneticRelationships::Individual');}
15 BEGIN {require_ok('Moose');}
17 my $f = SGN::Test::Fixture->new();
18 my $schema = $f->bcs_schema();;
19 ok(my $cross = Bio::GeneticRelationships::Pedigree->new(name => "xyzAccession1234", cross_type => "biparental"),"Create pedigree object");
20 ok(my $female_parent = Bio::GeneticRelationships::Individual->new(name => 'zyxFemale1234'),"Create individual for pedigree");
21 ok(my $male_parent = Bio::GeneticRelationships::Individual->new(name => 'zyxMale1234'),"Create individual for pedigree");
22 ok($cross->set_female_parent($female_parent), "Set a female parent for a pedigree");
23 ok($cross->set_male_parent($male_parent), "Set a male parent for a pedigree");
25 push (@crosses, $cross);