Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
urgi-is
FAIDARE
Commits
f07a9089
Commit
f07a9089
authored
Apr 07, 2021
by
Cyril Pommier
Committed by
Célia Michotey
Aug 20, 2021
Browse files
Add tests correction
parent
c1d3d129
Changes
2
Hide whitespace changes
Inline
Side-by-side
backend/src/test/java/fr/inra/urgi/faidare/repository/es/GermplasmRepositoryTest.java
View file @
f07a9089
...
...
@@ -76,7 +76,7 @@ class GermplasmRepositoryTest {
@Test
void
should_Get_
By_Id_Mcp
d
()
{
void
should_Get_
Mcpd_By_I
d
()
{
String
germplasmDbId
=
"13705"
;
GermplasmMcpdVO
germplasm
=
repository
.
getAsMcpdById
(
germplasmDbId
);
assertThat
(
germplasm
).
isNotNull
();
...
...
@@ -91,6 +91,18 @@ class GermplasmRepositoryTest {
assertThat
(
germplasm
).
isNull
();
}
@Test
void
should_Get_Mcpd_By_Id_checkAll
()
{
String
germplasmDbId
=
"13705"
;
GermplasmMcpdVO
germplasm
=
repository
.
getAsMcpdById
(
germplasmDbId
);
assertThat
(
germplasm
).
isNotNull
();
assertThat
(
germplasm
.
getGermplasmDbId
()).
isEqualTo
(
germplasmDbId
);
assertThat
(
germplasm
.
getCollectingInfo
()).
isNotNull
();
assertThat
(
germplasm
.
getCollectingInfo
().
getCollectingSite
()).
isNotNull
();
assertThat
(
germplasm
.
getCollectingInfo
().
getCollectingSite
().
getLocationDbId
()).
isNotNull
();
assertThat
(
germplasm
.
getCollectingInfo
().
getCollectingSite
().
getLocationDbId
()).
isEqualTo
(
"dXJuOlVSR0kvbG9jYXRpb24vNDA2MzU="
);
assertThat
(
germplasm
.
getCollectingInfo
().
getCollectingSite
().
getLocationDbId
()).
isNotEqualTo
(
"dXJuOlVSR0kvbG9"
);
}
@Test
void
should_Not_Get_By_Incorrect_Id
()
{
...
...
backend/src/test/resources/fr/inra/urgi/faidare/repository/es/setup/index/germplasmMcpd_mapping.json
View file @
f07a9089
...
...
@@ -138,19 +138,19 @@
"type"
:
"keyword"
},
"latitudeDecimal"
:
{
"type"
:
"
integer
"
"type"
:
"
keyword
"
},
"latitudeDegrees"
:
{
"type"
:
"
integer
"
"type"
:
"
keyword
"
},
"locationDescription"
:
{
"type"
:
"keyword"
},
"longitudeDecimal"
:
{
"type"
:
"
integer
"
"type"
:
"
keyword
"
},
"longitudeDegrees"
:
{
"type"
:
"
integer
"
"type"
:
"
keyword
"
},
"spatialReferenceSystem"
:
{
"type"
:
"keyword"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment