use of com.microsoft.azure.sdk.iot.provisioning.device.ProvisioningDeviceClient in project azure-iot-sdk-java by Azure.
the class ProvisioningDeviceClientTest method closeNowTerminatedSucceeds.
@Test
public void closeNowTerminatedSucceeds() throws ProvisioningDeviceClientException {
// arrange
new NonStrictExpectations() {
{
mockedExecutorService.isTerminated();
result = true;
}
};
ProvisioningDeviceClient testProvisioningDeviceClient = ProvisioningDeviceClient.create(END_POINT, SCOPE_ID, TEST_PROTOCOL, mockedSecurityProvider);
// act
testProvisioningDeviceClient.closeNow();
// assert
new Verifications() {
{
mockedExecutorService.shutdownNow();
times = 0;
}
};
}
Aggregations