Commit 423fc2a9 authored by jashaikh's avatar jashaikh

Added Jacoco Code Coverage For Sonar.

parent 17e317fa
......@@ -86,24 +86,20 @@ public class AzureAppConfigService {
* Execute All Operation
*/
public void azureAppConfiguration() {
try {
String readValueByKey = getValueByKey(EXISTING_KEY);
LOGGER.info("Message: {}", readValueByKey);
String readValueByKey = getValueByKey(EXISTING_KEY);
LOGGER.info("Message: {}", readValueByKey);
String writeValueByKey = writeValueByKey(NEW_KEY, "Data Source URL");
LOGGER.info("Data Source URL From Application: {}", writeValueByKey);
String writeValueByKey = writeValueByKey(NEW_KEY, "Data Source URL");
LOGGER.info("Data Source URL From Application: {}", writeValueByKey);
PagedIterable<ConfigurationSetting> readAllKeyValue = readAllKeyValue();
readAllKeyValue.forEach(property -> LOGGER.info("Key: {} \t Value: {}", property.getKey(), property.getValue()));
PagedIterable<ConfigurationSetting> readAllKeyValue = readAllKeyValue();
readAllKeyValue.forEach(property -> LOGGER.info("Key: {} \t Value: {}", property.getKey(), property.getValue()));
String deleteValueByKey = deleteValueByKey(NEW_KEY);
LOGGER.warn("[Key: {} \t Value: {}] has been removed successfully", NEW_KEY, deleteValueByKey);
String deleteValueByKey = deleteValueByKey(NEW_KEY);
LOGGER.warn("[Key: {} \t Value: {}] has been removed successfully", NEW_KEY, deleteValueByKey);
LOGGER.info("After Removing Key-Value Read All Values...");
readAllKeyValue = readAllKeyValue();
readAllKeyValue.forEach(property -> LOGGER.info("Key: {} \t Value: {}", property.getKey(), property.getValue()));
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
LOGGER.info("After Removing Key-Value Read All Values...");
readAllKeyValue = readAllKeyValue();
readAllKeyValue.forEach(property -> LOGGER.info("Key: {} \t Value: {}", property.getKey(), property.getValue()));
}
}
......@@ -81,4 +81,10 @@ class AzureAppConfigServiceTest {
void deleteValueByKeyException() {
assertNull(azureAppConfigService.deleteValueByKey(null));
}
@Test
@Order(8)
void testAzureAppConfiguration() {
azureAppConfigService.azureAppConfiguration();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment