use of com.microsoft.azure.sdk.iot.service.DeviceStatus in project azure-iot-sdk-java by Azure.
the class DeviceTest method constructor_sets_status_and_symmetrickey.
// Tests_SRS_SERVICE_SDK_JAVA_DEVICE_15_007: [The constructor shall store
// the input device status and symmetric key into a member variable]
@Test
public void constructor_sets_status_and_symmetrickey() throws NoSuchAlgorithmException {
// Arrange
String deviceId = "xxx-device";
DeviceStatus expectedDeviceStatus = DeviceStatus.Disabled;
SymmetricKey expectedSymmetricKey = new SymmetricKey();
// Act
Device device = Deencapsulation.newInstance(Device.class, deviceId, expectedDeviceStatus, expectedSymmetricKey);
// Assert
assertEquals(expectedDeviceStatus, device.getStatus());
assertEquals(expectedSymmetricKey, device.getSymmetricKey());
}
Aggregations