use of com.microsoft.azure.sdk.iot.service.FileUploadNotificationReceiver in project azure-iot-sdk-java by Azure.
the class FileUploadNotificationReceiverTest method constructorInputSasTokenEmpty.
// Assert
@Test(expected = IllegalArgumentException.class)
public void constructorInputSasTokenEmpty() throws Exception {
// Arrange
final String hostName = "xxx";
final String userName = "xxx";
final String sasToken = "";
IotHubServiceClientProtocol iotHubServiceClientProtocol = IotHubServiceClientProtocol.AMQPS;
// Act
FileUploadNotificationReceiver fileUploadNotificationReceiver = Deencapsulation.newInstance(FileUploadNotificationReceiver.class, hostName, userName, sasToken, iotHubServiceClientProtocol);
}
use of com.microsoft.azure.sdk.iot.service.FileUploadNotificationReceiver in project azure-iot-sdk-java by Azure.
the class FileUploadNotificationReceiverTest method openCallReceiverOpen.
// Tests_SRS_SERVICE_SDK_JAVA_FILEUPLOADNOTIFICATIONRECEIVER_25_004: [** The function shall call open() on the member AmqpFileUploadNotificationReceive object **]**
@Test
public void openCallReceiverOpen() throws Exception {
// Arrange
final String hostName = "xxx";
final String userName = "xxx";
final String sasToken = "xxx";
IotHubServiceClientProtocol iotHubServiceClientProtocol = IotHubServiceClientProtocol.AMQPS;
FileUploadNotificationReceiver fileUploadNotificationReceiver = Deencapsulation.newInstance(FileUploadNotificationReceiver.class, hostName, userName, sasToken, iotHubServiceClientProtocol);
// Act
fileUploadNotificationReceiver.open();
// Assert
new Verifications() {
{
amqpFileUploadNotificationReceive.open();
times = 1;
}
};
}
Aggregations