diff options
author | waynedunican <wayne.dunican@est.tech> | 2024-06-13 09:24:00 +0100 |
---|---|---|
committer | waynedunican <wayne.dunican@est.tech> | 2024-06-24 16:30:48 +0100 |
commit | 7b11ab5c03a438aa29ff2242fa06bb8ff28c2867 (patch) | |
tree | 2c76324c1d60b761f09b82fb1786e4633510dbb9 /models-interactions/model-impl/appclcm/src | |
parent | bacd5a6f57e79f26d447644329b585991f989123 (diff) |
Convert models to JUnit 5
Review for models-impl
Issue-ID: POLICY-5042
Change-Id: I22ff90b12da3fb2ba4d0eead7afb9282eac6921f
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-interactions/model-impl/appclcm/src')
5 files changed, 26 insertions, 24 deletions
diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmCommonHeaderTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmCommonHeaderTest.java index 1c71c85b8..785de692c 100644 --- a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmCommonHeaderTest.java +++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmCommonHeaderTest.java @@ -3,7 +3,7 @@ * appclcm * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019, 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,15 +21,15 @@ package org.onap.policy.appclcm; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.UUID; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class AppcLcmCommonHeaderTest { +class AppcLcmCommonHeaderTest { @Test - public void testAppcLcmCommonHeaderConstructor() { + void testAppcLcmCommonHeaderConstructor() { AppcLcmCommonHeader commonHeader = new AppcLcmCommonHeader("Policy", UUID.randomUUID(), "1"); AppcLcmCommonHeader commonHeaderCopy = new AppcLcmCommonHeader(commonHeader); assertEquals(commonHeader, commonHeaderCopy); diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmModelsTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmModelsTest.java index d1a02ea9e..61d73b7df 100644 --- a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmModelsTest.java +++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmModelsTest.java @@ -3,6 +3,7 @@ * appclcm * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,14 +27,14 @@ import com.openpojo.validation.Validator; import com.openpojo.validation.ValidatorBuilder; import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.onap.policy.common.utils.test.ToStringTester; -public class AppcLcmModelsTest { +class AppcLcmModelsTest { private static final String POJO_PACKAGE = "org.onap.policy.appclcm"; @Test - public void testAppcLcmModels() { + void testAppcLcmModels() { final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester()) .with(new GetterTester()).build(); diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmOutputTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmOutputTest.java index 1490416cd..31d6bca01 100644 --- a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmOutputTest.java +++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmOutputTest.java @@ -3,7 +3,7 @@ * appclcm * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019, 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,18 +21,18 @@ package org.onap.policy.appclcm; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.HashMap; import java.util.Map; import java.util.UUID; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class AppcLcmOutputTest { +class AppcLcmOutputTest { @Test - public void testAppcLcmOutput() { + void testAppcLcmOutput() { AppcLcmCommonHeader commonHeader = new AppcLcmCommonHeader("Policy", UUID.randomUUID(), "1"); Map<String, String> actionIdentifiers = new HashMap<>(); AppcLcmInput input = new AppcLcmInput(commonHeader, "testAction", actionIdentifiers, "testPayload"); diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmResponseCodeTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmResponseCodeTest.java index 4cadd1e63..300b05e18 100644 --- a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmResponseCodeTest.java +++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/AppcLcmResponseCodeTest.java @@ -3,6 +3,7 @@ * appclcm * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,15 +21,15 @@ package org.onap.policy.appclcm; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class AppcLcmResponseCodeTest { +class AppcLcmResponseCodeTest { @Test - public void testAppcLcmResponseCode() { + void testAppcLcmResponseCode() { assertNull(AppcLcmResponseCode.toResponseValue(0)); assertEquals(AppcLcmResponseCode.ACCEPTED, AppcLcmResponseCode.toResponseValue(100)); diff --git a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java index 52c2c54bd..543570226 100644 --- a/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java +++ b/models-interactions/model-impl/appclcm/src/test/java/org/onap/policy/appclcm/util/SerializationTest.java @@ -3,7 +3,7 @@ * appclcm * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019, 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,17 +21,17 @@ package org.onap.policy.appclcm.util; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.time.Instant; import java.time.ZoneId; import java.time.ZonedDateTime; -import org.junit.Test; +import org.junit.jupiter.api.Test; -public class SerializationTest { +class SerializationTest { @Test - public void test() { + void test() { String nameString = "Dorothy"; String jsonName = Serialization.gsonPretty.toJson(nameString, String.class); assertEquals("\"Dorothy\"", jsonName); |