@HttpTest( method = Method.POST, path = "/message/tester1", type = MediaType.APPLICATION_JSON, content = "{\"content\":\"hello1fortest\"}") public void testSendPublicWall_Pos() { assertOk(response); String Messg = response.getBody(); Assert.assertEquals("wall message saved", Messg); }
@HttpTest( method = Method.POST, path = "/message/tester1/notExist", type = MediaType.APPLICATION_JSON, content = "{\"content\":\"nice2meetUFrom1\"}") public void testSendPrivateChat_Neg() { assertNotFound(response); String Messg = response.getBody(); Assert.assertEquals("Unauthorized User: notExist", Messg); }
@HttpTest(method = Method.GET, path = "/messages/tester1/notExist") public void testGetPrivateChats_Neg() { assertNotFound(response); String Messg = response.getBody(); Assert.assertEquals("Unauthorized User: notExist", Messg); }
@HttpTest(method = Method.GET, path = "/users/notExist/chatbuddies") public void testGetBuddies_Neg() { assertNotFound(response); String Messg = response.getBody(); Assert.assertEquals("Unauthorized User: notExist", Messg); }