use of com.microsoft.azure.sdk.iot.provisioning.device.internal.contract.http.ContractAPIHttp in project azure-iot-sdk-java by Azure.
the class ContractAPIHttpTest method getRegistrationStatusThrowsOnNullOperationId.
// SRS_ContractAPIHttp_25_018: [If either operationId, registrationId, sslcontext or restResponseCallback is null or if operationId, registrationId is empty then this method shall throw ProvisioningDeviceClientException.]
@Test(expected = ProvisioningDeviceClientException.class)
public void getRegistrationStatusThrowsOnNullOperationId() throws ProvisioningDeviceClientException {
// arrange
ContractAPIHttp contractAPIHttp = createContractClass();
new NonStrictExpectations() {
{
mockedRequestData.getOperationId();
result = null;
mockedRequestData.getRegistrationId();
result = TEST_REGISTRATION_ID;
mockedRequestData.getSslContext();
result = mockedSslContext;
mockedRequestData.getSasToken();
result = null;
}
};
// act
contractAPIHttp.getRegistrationStatus(mockedRequestData, mockedResponseCallback, null);
}
Aggregations