use of com.microsoft.azure.sdk.iot.service.RegistryStatistics in project azure-iot-sdk-java by Azure.
the class RegistryStatisticsTests method constructorSucceeds.
@Test
public void constructorSucceeds(@Mocked RegistryManager mockedRegistryManager) throws IOException, IotHubException {
//arrange
String connectionString = "HostName=aaa.bbb.ccc;SharedAccessKeyName=XXX;SharedAccessKey=YYY";
RegistryManager registryManager = RegistryManager.createFromConnectionString(connectionString);
// act
RegistryStatistics statistics = registryManager.getStatistics();
}
use of com.microsoft.azure.sdk.iot.service.RegistryStatistics in project azure-iot-sdk-java by Azure.
the class RegistryStatisticsTests method gettersSucceeds.
@Test
public void gettersSucceeds(@Mocked RegistryManager mockedRegistryManager) throws IOException, IotHubException {
//arrange
String connectionString = "HostName=aaa.bbb.ccc;SharedAccessKeyName=XXX;SharedAccessKey=YYY";
RegistryManager registryManager = RegistryManager.createFromConnectionString(connectionString);
RegistryStatistics statistics = registryManager.getStatistics();
//act
final long disabledDeviceCount = statistics.getDisabledDeviceCount();
final long enabledDeviceCount = statistics.getEnabledDeviceCount();
final long totalDeviceCount = statistics.getTotalDeviceCount();
//assert
assertEquals(disabledDeviceCount, 0);
assertEquals(enabledDeviceCount, 0);
assertEquals(totalDeviceCount, 0);
}
Aggregations