use of com.microsoft.azure.sdk.iot.service.AuthenticationMethod in project azure-iot-sdk-java by Azure.
the class IotHubConnectionStringBuilderTest method createConnectionString_hosName_empty.
// Tests_SRS_SERVICE_SDK_JAVA_IOTHUBCONNECTIONSTRINGBUILDER_12_003: [The function shall throw IllegalArgumentException if the input string is empty or null]
// Assert
@Test(expected = IllegalArgumentException.class)
public void createConnectionString_hosName_empty() throws Exception {
// Arrange
AuthenticationMethod authenticationMethod = new ServiceAuthenticationWithSharedAccessPolicyKey("", "");
// Act
IotHubConnectionString iotHubConnectionString = IotHubConnectionStringBuilder.createConnectionString("", authenticationMethod);
}
use of com.microsoft.azure.sdk.iot.service.AuthenticationMethod in project azure-iot-sdk-java by Azure.
the class IotHubConnectionStringBuilderTest method createConnectionString_hostName_null.
// Tests_SRS_SERVICE_SDK_JAVA_IOTHUBCONNECTIONSTRINGBUILDER_12_003: [The function shall throw IllegalArgumentException if the input string is empty or null]
// Assert
@Test(expected = IllegalArgumentException.class)
public void createConnectionString_hostName_null() throws Exception {
// Arrange
AuthenticationMethod authenticationMethod = new ServiceAuthenticationWithSharedAccessPolicyKey("", "");
// Act
IotHubConnectionString iotHubConnectionString = IotHubConnectionStringBuilder.createConnectionString(null, authenticationMethod);
}
use of com.microsoft.azure.sdk.iot.service.AuthenticationMethod in project azure-iot-sdk-java by Azure.
the class IotHubConnectionStringBuilderTest method createConnectionString_authenticationMethod_null.
// Tests_SRS_SERVICE_SDK_JAVA_IOTHUBCONNECTIONSTRINGBUILDER_12_004: [The function shall throw IllegalArgumentException if the input authenticationMethod is null]
// Assert
@Test(expected = IllegalArgumentException.class)
public void createConnectionString_authenticationMethod_null() throws Exception {
// Arrange
AuthenticationMethod authenticationMethod = null;
// Act
IotHubConnectionString iotHubConnectionString = IotHubConnectionStringBuilder.createConnectionString("test", authenticationMethod);
}
Aggregations