File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/test/java/org/icatproject/integration Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -287,6 +287,17 @@ public void TestJsoniseBean() throws Exception {
287287 JsonArray st_response = search (session , "SELECT st from SampleType st WHERE st.name = 'diamond'" , 1 );
288288 collector .checkThat (st_response .getJsonObject (0 ).containsKey ("SampleType" ), is (true ));
289289
290+ /*
291+ * Expected: <[{"SampleType":{"id":????,"createId":"db/notroot","createTime":
292+ * "2019-03-11T15:58:33.000Z","modId":"db/notroot","modTime":
293+ * "2019-03-11T15:58:33.000Z","molecularFormula":null,"name":"N/A",
294+ * "pid":"st:004","safetyInformation":"N/A","samples":[]}}]>
295+ */
296+ JsonArray st_null_response = search (session , "SELECT st from SampleType st WHERE st.name = 'N/A'" , 1 );
297+ collector .checkThat (st_null_response .getJsonObject (0 ).containsKey ("SampleType" ), is (true ));
298+ collector .checkThat (st_null_response .getJsonObject (0 ).getJsonObject ("SampleType" ).getString ("pid" ), is ("st:004" ));
299+ collector .checkThat (st_null_response .getJsonObject (0 ).getJsonObject ("SampleType" ).get ("molecularFormula" ), is (JsonValue .NULL ));
300+
290301 /*
291302 * Expected: <[{"Sample":{"id":2181,"createId":"db/notroot","createTime":
292303 * "2019-03-11T15:58:33.000Z","modId":"db/notroot","modTime":
You can’t perform that action at this time.
0 commit comments