use of com.microsoft.azure.sdk.iot.service.ConfigurationContent in project azure-iot-sdk-java by Azure.
the class ConfigurationContentTest method ToParserSuccess.
// Tests_SRS_SERVICE_SDK_JAVA_CONFIGURATION_CONTENT_34_003: [This function shall return a configuration parser instance with the same modules content and device content as this object.]
@Test
public void ToParserSuccess() {
// arrange
Map<String, Map<String, Object>> mc = new HashMap<String, Map<String, Object>>() {
{
put("mproperty", new HashMap<String, Object>() {
{
put("abc", "123");
put("cde", "456");
}
});
}
};
Map<String, Object> dc = new HashMap<String, Object>() {
{
put("dproperty", new HashMap<String, Integer>() {
{
put("c", 3);
put("d", 4);
}
});
}
};
ConfigurationContent cc = new ConfigurationContent();
// act
ConfigurationContentParser parser = cc.toConfigurationContentParser();
// assert
assertEquals(cc.getDeviceContent(), parser.getDeviceContent());
assertEquals(cc.getModulesContent(), parser.getModulesContent());
}
Aggregations