use of com.microsoft.azure.sdk.iot.service.exceptions.IotHubNotFoundException in project azure-iot-sdk-java by Azure.
the class DeviceMethodIT method invokeMethod_resetDevice_failed.
@Test
public void invokeMethod_resetDevice_failed() throws Exception {
// Arrange
TestDevice testDevice = devices.get(0);
// Act
try {
MethodResult result = methodServiceClient.invoke(testDevice.getDeviceId(), METHOD_RESET, RESPONSE_TIMEOUT, CONNECTION_TIMEOUT, null);
testDevice.restartDevice();
throw new Exception("Reset device do not affect the method invoke on the service");
} catch (IotHubNotFoundException expected) {
// Don't do anything, expected throw.
}
testDevice.restartDevice();
}
Aggregations