Writing the assertions

Now, let's assert the response by invoking the getOrg() function by passing the token returned from the getToken() function:

@Test
fun testGetOrg() {
var response = getOrg(getToken())
assertNotNull(response)
assertNotNull(response.get("orgName"))
assertNotNull(response.get("orgId"))
}

Let's run this test case and see what happens:

As we can see, this integration test is able to invoke the APIs, and then the assertions are passed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset