use of com.microsoft.azure.sdk.iot.device.net.IotHubMessageUri in project azure-iot-sdk-java by Azure.
the class IotHubMessageUriTest method getHostnameIsCorrect.
// Tests_SRS_IOTHUBMESSAGEURI_11_003: [The function shall return the hostname given in the constructor.]
@Test
public void getHostnameIsCorrect() throws URISyntaxException {
final String iotHubHostname = "test.iothub";
final String deviceId = "test-deviceid";
final String hostname = "test-hostname";
new NonStrictExpectations() {
{
mockIotHubUri.getHostname();
result = hostname;
}
};
IotHubMessageUri messageUri = new IotHubMessageUri(iotHubHostname, deviceId, "");
String testHostname = messageUri.getHostname();
assertThat(testHostname, is(hostname));
}
Aggregations