1 #test all functions in CXGN::Stock::Vector
9 use SGN::Test::Fixture;
10 use CXGN::Stock::Vector;
11 use CXGN::Stock::SearchVector;
12 use SGN::Model::Cvterm;
14 my $f = SGN::Test::Fixture->new();
15 my $schema = $f->bcs_schema();
16 my $people_schema = $f->people_schema();
17 my $phenome_schema = $f->phenome_schema();
20 my $type_id = SGN::Model::Cvterm->get_cvterm_row($schema, 'vector_construct', 'stock_type')->cvterm_id();
23 my $check_name_exists= 0;
24 my $type= 'vector_construct';
25 my $type_id= $type_id;
26 my $sp_person_id = '41';
27 my $user_name = 'janedoe';
28 my $species = 'Solanum lycopersicum';
29 my $name = 'tomato10';
30 my $uniquename = 'tomato10';
31 my $strain = 'strain1';
32 my $backbone = 'backbone1';
33 my $cloning_organism = 'tomato';
34 my $inherent_marker = 'marker1';
35 my $selection_marker = 'marker2';
36 my $cassette_name = 'cassette1';
37 my $vector_type = 'no_nitab';
39 my $promotors = 'promotors1';
40 my $terminators = 'terminators1';
41 my $bacterial_resistant_marker = 'BR Marker';
42 my $plant_antibiotic_resistant_marker = 'PAR Marker';
44 my $stock = CXGN::Stock::Vector->new({
49 sp_person_id => $sp_person_id,
50 user_name => $user_name,
53 uniquename=>$uniquename,
56 CloningOrganism=>$cloning_organism,
57 InherentMarker=>$inherent_marker,
58 SelectionMarker=>$selection_marker,
59 CassetteName=>$cassette_name,
60 VectorType=>$vector_type,
62 Promotors=>$promotors,
63 Terminators=>$terminators,
64 PlantAntibioticResistantMarker=>$plant_antibiotic_resistant_marker,
65 BacterialResistantMarker=>$bacterial_resistant_marker
68 my $stock_id = $stock->store();
69 my $s = CXGN::Stock::Vector->new(schema=>$schema, stock_id=>$stock_id);
71 is_deeply($s->name,$name);
72 is_deeply($s->uniquename,$uniquename);
73 is_deeply($s->Strain,$strain);
74 is_deeply($s->Backbone,$backbone);
75 is_deeply($s->CloningOrganism,$cloning_organism);
76 is_deeply($s->InherentMarker,$inherent_marker);
77 is_deeply($s->SelectionMarker,$selection_marker);
78 is_deeply($s->CassetteName,$cassette_name);
79 is_deeply($s->VectorType,$vector_type);
80 is_deeply($s->Gene,$gene);
81 is_deeply($s->Promotors,$promotors);
82 is_deeply($s->Terminators,$terminators);
83 is_deeply($s->PlantAntibioticResistantMarker,$plant_antibiotic_resistant_marker);
84 is_deeply($s->BacterialResistantMarker,$bacterial_resistant_marker);