diff options
Diffstat (limited to 'common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java')
-rw-r--r-- | common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java index d9d7f69157..74dd40c638 100644 --- a/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java +++ b/common/onap-tosca-datatype/src/test/java/org/onap/sdc/tosca/services/CommonUtilTest.java @@ -19,13 +19,13 @@ */ package org.onap.sdc.tosca.services; -import java.lang.reflect.InvocationTargetException; +import static org.junit.jupiter.api.Assertions.assertEquals; + import java.util.HashMap; import java.util.Map; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class CommonUtilTest { +class CommonUtilTest { private static final String INT_FIELD_KEY = "field1"; private static final Integer INT_FIELD_VALUE = 1; @@ -33,13 +33,12 @@ public class CommonUtilTest { private static final String STRING_FIELD_VALUE = "abc"; @Test - public void testPopulateBeanMethod() - throws InstantiationException, IllegalAccessException, InvocationTargetException { + void testPopulateBeanMethod() throws Exception { Map<String, Object> props = new HashMap<>(); props.put(INT_FIELD_KEY, INT_FIELD_VALUE); props.put(STRING_FIELD_KEY, STRING_FIELD_VALUE); TestModel testModel = CommonUtil.populateBean(props, TestModel.class); - Assert.assertEquals(testModel.getField1(), INT_FIELD_VALUE); - Assert.assertEquals(testModel.getField2(), STRING_FIELD_VALUE); + assertEquals(testModel.getField1(), INT_FIELD_VALUE); + assertEquals(testModel.getField2(), STRING_FIELD_VALUE); } -}
\ No newline at end of file +} |