Skip to content

Adds the test cases for the Lau-Nuts API#6

Open
vikrantsingh29 wants to merge 5 commits into
pg-dp:masterfrom
vikrantsingh29:vikrantTestApi
Open

Adds the test cases for the Lau-Nuts API#6
vikrantsingh29 wants to merge 5 commits into
pg-dp:masterfrom
vikrantsingh29:vikrantTestApi

Conversation

@vikrantsingh29

Copy link
Copy Markdown
Collaborator
  • Creates the test cases for the JSON response.
  • Creates the test cases for turtle response.

Comment thread src/test/java/LaunutsApiTest.java Outdated
String content = EntityUtils.toString(entity);
JSONArray jsonArray = new JSONArray(content);

for (int i = 0; i < jsonArray.length(); i++) {

Copy link
Copy Markdown
Member

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);
}

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Collaborator Author

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 <singhvikrant29@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants