Commit 32c3f242 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unit tests fixed

parent 4b1daefe
Pipeline #28232 passed with stage
in 12 minutes and 9 seconds
......@@ -331,7 +331,9 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
int count = map.getElements().size() + map.getReactions().size();
ModelData submap = map.getSubmodels().iterator().next().getSubmodel();
int count = map.getElements().size() + map.getReactions().size()
+ submap.getElements().size() + submap.getReactions().size();
assertEquals("All bioEntities should be returned", count, new JsonParser()
.parse(response)
.getAsJsonArray().size());
......@@ -354,7 +356,9 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
int count = map.getElements().size() + map.getReactions().size();
ModelData submap = map.getSubmodels().iterator().next().getSubmodel();
int count = map.getElements().size() + map.getReactions().size()
+ submap.getElements().size() + submap.getReactions().size();
assertEquals("All bioEntities should be returned", count, new JsonParser()
.parse(response)
.getAsJsonArray().size());
......@@ -379,7 +383,9 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsString();
int count = map.getElements().size() + map.getReactions().size();
ModelData submap = map.getSubmodels().iterator().next().getSubmodel();
int count = map.getElements().size() + map.getReactions().size()
+ submap.getElements().size() + submap.getReactions().size();
assertEquals("All bioEntities should be returned", count, new JsonParser()
.parse(response)
.getAsJsonArray().size());
......@@ -1263,7 +1269,7 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
new BasicNameValuePair("googleLicenseConsent", "overlay name"),
new BasicNameValuePair("type", "GENERIC"))));
RequestBuilder request = post("/projects/"+TEST_PROJECT+"/overlays/")
RequestBuilder request = post("/projects/" + TEST_PROJECT + "/overlays/")
.contentType(MediaType.APPLICATION_FORM_URLENCODED)
.content(body)
.session(session);
......@@ -1272,5 +1278,4 @@ public class OverlayControllerIntegrationTest extends ControllerIntegrationTest
.andExpect(status().isForbidden());
}
}
Markdown is supported
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