Skip to content

Commit 0ac074b

Browse files
committed
Added null check
1 parent 67bcd17 commit 0ac074b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cwms-data-api/src/test/java/cwms/cda/api/TimeseriesControllerTestIT.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
import java.sql.SQLException;
2626
import java.time.ZonedDateTime;
2727
import javax.servlet.http.HttpServletResponse;
28+
29+
import io.restassured.response.ExtractableResponse;
30+
import io.restassured.response.Response;
2831
import mil.army.usace.hec.test.database.CwmsDatabaseContainer;
2932
import org.apache.commons.io.IOUtils;
3033
import org.junit.jupiter.api.Disabled;
@@ -497,7 +500,7 @@ void test_include_data_entry_date() throws Exception {
497500
// fyi 1675422000000 is Friday, February 3, 2023 11:00:00 AM
498501

499502
// get it back with the data entry date
500-
given()
503+
ExtractableResponse<Response> response = given()
501504
.log().ifValidationFails(LogDetail.ALL, true)
502505
.accept(Formats.JSONV2)
503506
.header("Authorization", user.toHeaderValue())
@@ -518,7 +521,10 @@ void test_include_data_entry_date() throws Exception {
518521
.statusCode(is(HttpServletResponse.SC_OK))
519522
.body("values.size()", equalTo(4))
520523
.body("values[0][1]", equalTo(4.0F))
521-
.body("values[0].size()", equalTo(4));
524+
.body("values[0].size()", equalTo(4))
525+
.extract();
526+
527+
assertNotNull(response.body().path("values[0][3]"));
522528

523529
// get it back without the data entry date
524530
given()

0 commit comments

Comments
 (0)