Fix test cases

revert-dabc3590
shamalka 5 years ago
parent de548efd18
commit 127934e0b5

@ -196,9 +196,9 @@ public class DeviceManagementServiceTests {
mockDeviceManagementService(); mockDeviceManagementService();
mockPolicyManagerService(); mockPolicyManagerService();
mockUser(); mockUser();
Response response = androidService.enrollDevice(TestUtils.getBasicAndroidDevice()); Message message = androidService.enrollDevice(TestUtils.getBasicAndroidDevice());
Assert.assertNotNull(response); Assert.assertNotNull(message);
Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); Assert.assertEquals(message.getResponseCode(), Response.Status.OK.getStatusCode());
} }
@Test @Test
@ -237,9 +237,9 @@ public class DeviceManagementServiceTests {
properties.add(property); properties.add(property);
androidDevice.setProperties(properties); androidDevice.setProperties(properties);
Response response = androidService.enrollDevice(androidDevice); Message message = androidService.enrollDevice(androidDevice);
Assert.assertNotNull(response); Assert.assertNotNull(message);
Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); Assert.assertEquals(message.getResponseCode(), Response.Status.OK.getStatusCode());
} }
@Test @Test
@ -249,9 +249,9 @@ public class DeviceManagementServiceTests {
mockUser(); mockUser();
AndroidDevice androidDevice = TestUtils.getBasicAndroidDevice(); AndroidDevice androidDevice = TestUtils.getBasicAndroidDevice();
androidDevice.setDeviceIdentifier("1234"); androidDevice.setDeviceIdentifier("1234");
Response response = androidService.enrollDevice(androidDevice); Message message = androidService.enrollDevice(androidDevice);
Assert.assertNotNull(response); Assert.assertNotNull(message);
Assert.assertEquals(response.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); Assert.assertEquals(message.getResponseCode(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
} }
@Test @Test

Loading…
Cancel
Save