-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds the test cases for the Lau-Nuts API #6
base: master
Are you sure you want to change the base?
Conversation
vikrantsingh29
commented
Jun 28, 2020
- Creates the test cases for the JSON response.
- Creates the test cases for turtle response.
src/test/java/LaunutsApiTest.java
Outdated
String content = EntityUtils.toString(entity); | ||
JSONArray jsonArray = new JSONArray(content); | ||
|
||
for (int i = 0; i < jsonArray.length(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please skip the for loop, we need only one object. Instead, just get the first element as follows:
JSONObject jsonobject = jsonArray.getJSONObject(0);
Same for all for loops....
Assert.assertEquals(arrays, | ||
coordinatesGot); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also test the polygon coordinates of TTL response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: vikrantsingh29 <[email protected]>
6640549
to
cdfbad4
Compare