added test cases to MetricRegistryImpl.java 19/85019/2
authorSandeep J <sandeejh@in.ibm.com>
Thu, 11 Apr 2019 07:37:14 +0000 (13:07 +0530)
committerTakamune Cho <takamune.cho@att.com>
Thu, 11 Apr 2019 14:41:59 +0000 (14:41 +0000)
to increase code coverage

Issue-ID: APPC-1086
Change-Id: I8804c14c88fe0857be7106edd621ee74f4dd1243
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
appc-metric/appc-metric-bundle/src/test/java/org/onap/appc/metricservice/impl/MetricRegistryImplTest.java

index 0bde7f7..ede0e1f 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2019 Ericsson
  * ================================================================================
+ * Modifications Copyright (C) 2019 IBM.
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -29,9 +31,11 @@ import static org.junit.Assert.assertTrue;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.appc.metricservice.metric.Counter;
+import org.onap.appc.metricservice.metric.MetricBuilderFactory;
 import org.onap.appc.metricservice.metric.MetricType;
 import org.onap.appc.metricservice.metric.impl.DefaultPrimitiveCounter;
 import org.onap.appc.metricservice.metric.impl.DispatchingFuntionMetricImpl;
+import org.onap.appc.metricservice.policy.PolicyBuilderFactory;
 
 public class MetricRegistryImplTest {
 
@@ -72,5 +76,15 @@ public class MetricRegistryImplTest {
         registry.dispose();
         assertEquals(0, registry.metrics().length);
     }
+    
+    @Test
+    public void testmetricBuilderFactory() {
+        assertTrue(registry.metricBuilderFactory() instanceof MetricBuilderFactory);
+    }
+    
+    @Test
+    public void testPolicyBuilderFactory() {
+        assertTrue(registry.policyBuilderFactory() instanceof PolicyBuilderFactory);
+    }
 
 }