summaryrefslogtreecommitdiffstats
path: root/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java')
-rw-r--r--components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java b/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java
index 236a15c4..5a552c51 100644
--- a/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java
+++ b/components/kpi-computation-ms/src/test/java/org/onap/dcaegen2/kpi/computation/KpiTest.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2021 China Mobile.
- * Copyright (C) 2021 Deutsche Telekom AG. All rights reserved.
+ * Copyright (C) 2022 Deutsche Telekom AG. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ public class KpiTest {
private static final String KPI_CONFIG_FILE = "kpi/kpi_config.json";
private static final String VES_MESSAGE_FILE = "kpi/ves_message.json";
private static final String KPI_CONFIG_RATIO_FILE = "kpi/kpi_config_ratio.json";
+ private static final String KPI_CONFIG_SUMRATIO_FILE = "kpi/kpi_config_sumratio.json";
@Test
public void testKpiConfigValidate() {
@@ -60,4 +61,11 @@ public class KpiTest {
assertEquals(kpiConfig.getDomain(), "measurementsForKpi");
}
+ @Test
+ public void testKpiConfigSumRatioValidate() {
+ String strKpiConfig = FileUtils.getFileContents(KPI_CONFIG_SUMRATIO_FILE);
+ KpiConfig kpiConfig = KpiJsonConversion.convertKpiConfig(strKpiConfig);
+ assertEquals(kpiConfig.getDomain(), "measurementsForKpi");
+ }
+
}