use of com.microsoft.azure.sdk.iot.provisioning.device.internal.contract.ResponseCallback in project azure-iot-sdk-java by Azure.
the class AmqpsProvisioningSaslHandlerTest method constructorSavesArgumentValues.
// Tests_SRS_AMQPSPROVISIONINGSASLHANDLER_34_001: [This constructor shall save the provided idScope, registrationId, endorsementKey, storageRootKey, responseCallback and autorizationCallbackContext .]
@Test
public void constructorSavesArgumentValues() {
// act
AmqpsProvisioningSaslHandler handler = Deencapsulation.newInstance(AmqpsProvisioningSaslHandler.class, new Class[] { String.class, String.class, byte[].class, byte[].class, ResponseCallback.class, Object.class }, idScope, registrationId, endorsementKey, storageRootKey, mockedResponseCallback, new Object());
// assert
String actualIdScope = Deencapsulation.getField(handler, "idScope");
String actualRegistrationId = Deencapsulation.getField(handler, "registrationId");
byte[] actualEndorsementKey = Deencapsulation.getField(handler, "endorsementKey");
byte[] actualStorageRootKey = Deencapsulation.getField(handler, "storageRootKey");
ResponseCallback actualNonceCallback = Deencapsulation.getField(handler, "responseCallback");
String actualSasToken = Deencapsulation.getField(handler, "sasToken");
assertEquals(idScope, actualIdScope);
assertEquals(registrationId, actualRegistrationId);
assertEquals(endorsementKey, actualEndorsementKey);
assertEquals(storageRootKey, actualStorageRootKey);
assertEquals(mockedResponseCallback, actualNonceCallback);
assertNull(actualSasToken);
}
Aggregations