Merge pull request #5243 from solgenomics/topic/observations_upload_catch_error
[sgn.git] / t / unit_fixture / CXGN / Pedigree / AddCrosses.t
blobfde0aedb5ee19bebfeb62960ba25781e3bbc2c79
1 ## A test for adding crosses
2 ## Jeremy D. Edwards (jde22@cornell.edu) 2013
4 use strict;
5 use warnings;
7 use lib 't/lib';
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");
24 my @crosses;
25 push (@crosses, $cross);