Commit 6ffaa014 authored by Cyril Pommier's avatar Cyril Pommier Committed by Célia Michotey
Browse files

remove deprecated tests elements. Build ok, test fails

parent f587f6a4
...@@ -108,7 +108,6 @@ class GermplasmControllerTest { ...@@ -108,7 +108,6 @@ class GermplasmControllerTest {
GermplasmVO germplasm = new GermplasmVO(); GermplasmVO germplasm = new GermplasmVO();
germplasm.setGroupId(0L); germplasm.setGroupId(0L);
germplasm.setSpeciesGroup(Collections.singletonList(1L));
germplasm.setGermplasmDbId("germplasmDbId"); germplasm.setGermplasmDbId("germplasmDbId");
germplasm.setDefaultDisplayName("defaultDisplayName"); germplasm.setDefaultDisplayName("defaultDisplayName");
...@@ -119,7 +118,6 @@ class GermplasmControllerTest { ...@@ -119,7 +118,6 @@ class GermplasmControllerTest {
DonorVO donor = new DonorVO(); DonorVO donor = new DonorVO();
donor.setDonorGermplasmPUI("pui"); donor.setDonorGermplasmPUI("pui");
donor.setDonationDate(1);
germplasm.setDonors(Collections.singletonList(donor)); germplasm.setDonors(Collections.singletonList(donor));
when(service.getById(anyString())).thenReturn(germplasm); when(service.getById(anyString())).thenReturn(germplasm);
......
...@@ -95,7 +95,6 @@ class GnpISGermplasmControllerTest { ...@@ -95,7 +95,6 @@ class GnpISGermplasmControllerTest {
GermplasmVO germplasm = new GermplasmVO(); GermplasmVO germplasm = new GermplasmVO();
germplasm.setGroupId(0L); germplasm.setGroupId(0L);
germplasm.setSpeciesGroup(Collections.singletonList(1L));
germplasm.setGermplasmDbId("germplasmDbId"); germplasm.setGermplasmDbId("germplasmDbId");
germplasm.setDefaultDisplayName("defaultDisplayName"); germplasm.setDefaultDisplayName("defaultDisplayName");
...@@ -107,7 +106,6 @@ class GnpISGermplasmControllerTest { ...@@ -107,7 +106,6 @@ class GnpISGermplasmControllerTest {
DonorVO donor = new DonorVO(); DonorVO donor = new DonorVO();
donor.setDonorGermplasmPUI("pui"); donor.setDonorGermplasmPUI("pui");
donor.setDonationDate(1);
germplasm.setDonors(Collections.singletonList(donor)); germplasm.setDonors(Collections.singletonList(donor));
PaginatedList<GermplasmVO> germplasmPage = new PaginatedList<>(null, Collections.singletonList(germplasm)); PaginatedList<GermplasmVO> germplasmPage = new PaginatedList<>(null, Collections.singletonList(germplasm));
...@@ -127,7 +125,7 @@ class GnpISGermplasmControllerTest { ...@@ -127,7 +125,7 @@ class GnpISGermplasmControllerTest {
.andExpect(jsonPath("$.donors[0].donorGermplasmPUI", is(donor.getDonorGermplasmPUI()))) .andExpect(jsonPath("$.donors[0].donorGermplasmPUI", is(donor.getDonorGermplasmPUI())))
// GnpIS specific fields should appear // GnpIS specific fields should appear
.andExpect(jsonPath("$.donors[0].donationDate", is(donor.getDonationDate()))) //.andExpect(jsonPath("$.donors[0].donationDate", is(donor.getDonationDate())))
.andExpect(jsonPath("$.collection[0].name", is(collection.getName()))); .andExpect(jsonPath("$.collection[0].name", is(collection.getName())));
} }
......
...@@ -78,7 +78,7 @@ class GermplasmRepositoryTest { ...@@ -78,7 +78,7 @@ class GermplasmRepositoryTest {
@Test @Test
void should_Get_By_Id_Mcpd() { void should_Get_By_Id_Mcpd() {
String germplasmDbId = "13705"; String germplasmDbId = "13705";
GermplasmMcpdVO germplasm = repository.getMcpdById(germplasmDbId); GermplasmMcpdVO germplasm = repository.getAsMcpdById(germplasmDbId);
assertThat(germplasm).isNotNull(); assertThat(germplasm).isNotNull();
assertThat(germplasm.getGermplasmDbId()).isEqualTo(germplasmDbId); assertThat(germplasm.getGermplasmDbId()).isEqualTo(germplasmDbId);
} }
...@@ -87,7 +87,7 @@ class GermplasmRepositoryTest { ...@@ -87,7 +87,7 @@ class GermplasmRepositoryTest {
@Test @Test
void should_Not_Get_Mcpd_With_Wrong_Id() { void should_Not_Get_Mcpd_With_Wrong_Id() {
String germplasmDbId = "489485184"; String germplasmDbId = "489485184";
GermplasmMcpdVO germplasm = repository.getMcpdById(germplasmDbId); GermplasmMcpdVO germplasm = repository.getAsMcpdById(germplasmDbId);
assertThat(germplasm).isNull(); assertThat(germplasm).isNull();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment