/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019, 2021, 2023 Nordix Foundation.
+ * Copyright (C) 2019, 2021, 2023, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
-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 jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import java.io.IOException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.errors.concepts.ErrorResponse;
-public class ExceptionsTest {
+class ExceptionsTest {
private static final String STRING_TEXT = "String";
private static final String MESSAGE = "Message";
@Test
- public void test() {
+ void test() {
assertNotNull(new PfModelException(Response.Status.OK, MESSAGE));
assertNotNull(new PfModelException(Response.Status.OK, MESSAGE, STRING_TEXT));
assertNotNull(new PfModelException(Response.Status.OK, MESSAGE, new IOException()));
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfModel;
-public class ModelServiceTest {
+class ModelServiceTest {
private static final String MODEL_KEY_IS_NULL = "modelKey is marked .*on.*ull but is null$";
private static final String MODEL_NAME = "ModelName";
@Test
- public void testModelService() {
+ void testModelService() {
PfModelService.clear();
assertFalse(PfModelService.existsModel("NonExistantName"));
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020, 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.
package org.onap.policy.models.base;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfConcept;
-public class PfConceptComparatorTest {
+class PfConceptComparatorTest {
@Test
- public void testPfConceptComparator() {
+ void testPfConceptComparator() {
assertEquals(0, new PfConceptComparator().compare(new DummyPfConcept(), new DummyPfConcept()));
}
}
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021, 2023 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2023, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyAuthorativeConcept;
import org.onap.policy.models.base.testconcepts.DummyBadPfConceptContainer;
import org.onap.policy.models.base.testconcepts.DummyPfConcept;
import org.onap.policy.models.base.testconcepts.DummyPfConceptContainer;
import org.onap.policy.models.base.testconcepts.DummyPfConceptSub;
-public class PfConceptContainerTest {
+class PfConceptContainerTest {
private static final String NAME0 = "name0";
private static final String NAME1 = "name1";
@SuppressWarnings({"unchecked", "rawtypes"})
@Test
- public void testConceptContainer() {
+ void testConceptContainer() {
DummyPfConceptContainer container = new DummyPfConceptContainer();
assertNotNull(container);
}
@Test
- public void testNamedConceptContainer() {
+ void testNamedConceptContainer() {
DummyPfConceptContainer container = new DummyPfConceptContainer();
container.getKey().setName(DUMMY_VALUE);
DummyPfConceptContainer clonedContainer = new DummyPfConceptContainer(container);
}
@Test
- public void testValidationContainer() {
+ void testValidationContainer() {
DummyPfConceptContainer container = new DummyPfConceptContainer();
PfConceptKey conceptKey = new PfConceptKey("Key", VERSION0_0_1);
Map<PfConceptKey, DummyPfConcept> conceptMap = new TreeMap<>();
}
@Test
- public void testSetContainer() {
+ void testSetContainer() {
DummyPfConceptContainer container = new DummyPfConceptContainer();
PfConceptKey conceptKey = new PfConceptKey("Key", VERSION0_0_1);
Map<PfConceptKey, DummyPfConcept> conceptMap = new TreeMap<>();
@Test
- public void testAuthorative() {
+ void testAuthorative() {
Map<String, DummyAuthorativeConcept> dacMap = new LinkedHashMap<>();
dacMap.put(NAME0, new DummyAuthorativeConcept(NAME0, "1.2.3", "Hello"));
dacMap.put(NAME1, new DummyAuthorativeConcept("IncorrectName", PfKey.NULL_KEY_VERSION, "Hi"));
.hasMessage("An incoming list of concepts must have at least one entry");
}
- @Test(expected = NullPointerException.class)
- public void testNullKey() {
- PfConceptKey nullKey = null;
- new DummyPfConceptContainer(nullKey);
+ @Test
+ void testNullKey() {
+ assertThrows(NullPointerException.class,
+ () -> {
+ PfConceptKey nullKey = null;
+ new DummyPfConceptContainer(nullKey);
+ });
}
}
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2020 Nordix Foundation.
+ * Copyright (C) 2020, 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.
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
/**
* Test the {@link PfObjectFilter} interface.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfConceptFilterTest {
+class PfConceptFilterTest {
@Test
- public void testPfConceptFilter() {
+ void testPfConceptFilter() {
List<PfConcept> listToBeFiltered = new ArrayList<>();
PfConceptFilter conceptFilter = new PfConceptFilter(null, null, null);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.TreeSet;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
/**
* Test the given concept class.
*/
-public class PfConceptGetterImplTest {
+class PfConceptGetterImplTest {
private static final String VERSION002 = "0.0.2";
private static final String VERSION001 = "0.0.1";
@Test
- public void testPfConceptGetterImpl() {
+ void testPfConceptGetterImpl() {
NavigableMap<PfConceptKey, PfConceptKey> keyMap = new TreeMap<>();
PfConceptGetterImpl<PfConceptKey> getter = new PfConceptGetterImpl<>(keyMap);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfConcept;
-public class PfConceptKeyTest {
+class PfConceptKeyTest {
private static final String VERSION001 = "0.0.1";
private static final String ID_IS_NULL = "id is marked .*on.*ull but is null$";
@Test
- public void testConceptKey() {
+ void testConceptKey() {
PfConceptKey someKey0 = new PfConceptKey();
assertEquals(PfConceptKey.getNullKey(), someKey0);
assertTrue(someKey0.isNullKey());
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021,2023 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2023, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.reflect.Field;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.common.parameters.annotations.Pattern;
import org.onap.policy.models.base.PfKey.Compatibility;
import org.onap.policy.models.base.testconcepts.DummyPfKey;
-public class PfKeyImplTest {
+class PfKeyImplTest {
private static final String OTHER_IS_NULL = "^otherKey is marked .*on.*ull but is null$";
private static final String ID_IS_NULL = "^id is marked .*on.*ull but is null$";
/**
* Sets data in Keys for the tests.
*/
- @BeforeClass
+ @BeforeAll
public static void setUp() {
someKey = new MyKey();
}
@Test
- public void testConceptKey() {
+ void testConceptKey() {
assertThatIllegalArgumentException().isThrownBy(() -> new MyKey("some bad key id"))
.withMessage("parameter \"id\": value \"some bad key id\", " + "does not match regular expression \""
+ PfKey.KEY_ID_REGEXP + "\"");
}
@Test
- public void testCompatibilityConceptKey() {
+ void testCompatibilityConceptKey() {
assertEquals("name:0.1.2", someKey4.getId());
assertThatThrownBy(() -> someKey0.getCompatibility(null)).isInstanceOf(NullPointerException.class)
}
@Test
- public void testValidityConceptKey() {
+ void testValidityConceptKey() {
assertTrue(someKey0.validate("").isValid());
assertTrue(someKey1.validate("").isValid());
assertTrue(someKey2.validate("").isValid());
}
@Test
- public void testCleanConceptKey() {
+ void testCleanConceptKey() {
someKey0.clean();
assertNotNull(someKey0.toString());
}
@Test
- public void testNullArguments() {
+ void testNullArguments() {
assertThatThrownBy(() -> new MyKey((String) null)).hasMessageMatching(ID_IS_NULL);
assertThatThrownBy(() -> new MyKey((MyKey) null))
}
@Test
- public void testValidation() throws Exception {
+ void testValidation() throws Exception {
MyKey testKey = new MyKey("TheKey", VERSION001);
assertEquals("TheKey:0.0.1", testKey.getId());
}
@Test
- public void testkeynewerThan() {
+ void testkeynewerThan() {
MyKey key1 = new MyKey("Key1", VERSION123);
assertThatThrownBy(() -> key1.isNewerThan(null)).hasMessageMatching(OTHER_IS_NULL);
}
@Test
- public void testmajorMinorPatch() {
+ void testmajorMinorPatch() {
MyKey key = new MyKey("Key", VERSION100);
assertEquals(1, key.getMajorVersion());
assertEquals(0, key.getMinorVersion());
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.PfKey.Compatibility;
import org.onap.policy.models.base.testconcepts.DummyPfConceptKeySub;
-public class PfKeyUseTest {
+class PfKeyUseTest {
private static final String OTHER_KEY_IS_NULL = "^otherKey is marked .*on.*ull but is null$";
@Test
- public void testKeyUse() {
+ void testKeyUse() {
assertNotNull(new PfKeyUse());
assertNotNull(new PfKeyUse(new PfConceptKey()));
assertNotNull(new PfKeyUse(new PfReferenceKey()));
}
@Test
- public void testNullKey() {
+ void testNullKey() {
PfKeyUse keyUseNull = new PfKeyUse(PfConceptKey.getNullKey());
PfKeyUse keyUse = new PfKeyUse();
assertEquals(false, keyUseNull.validate("").isValid());
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020, 2023 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2023, 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.
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThat;
-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 jakarta.ws.rs.core.Response;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.errors.concepts.ErrorResponseInfo;
/**
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfModelExceptionInfoTest {
+class PfModelExceptionInfoTest {
@Test
- public void testExceptionInfo() {
+ void testExceptionInfo() {
final PfModelException pfme = new PfModelException(Response.Status.ACCEPTED, "HELLO");
assertThat(pfme).hasMessage("HELLO");
assertEquals("Server returned: Accepted", getErrorMessage(pfme).substring(0, 25));
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfModel;
/**
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfModelTest {
+class PfModelTest {
private static final String VERSION001 = "0.0.1";
@Test
- public void testPfModel() {
+ void testPfModel() {
assertNotNull(new DummyPfModel());
assertNotNull(new DummyPfModel(new PfConceptKey()));
assertNotNull(new DummyPfModel(new DummyPfModel()));
}
@Test
- public void testPfModelValidation() {
+ void testPfModelValidation() {
PfConceptKey dpmKey = new PfConceptKey("modelKey", VERSION001);
DummyPfModel dpm = new DummyPfModel(dpmKey);
assertTrue(dpm.validate("").isValid());
}
@Test
- public void testPfReferenceValidation() {
+ void testPfReferenceValidation() {
PfConceptKey dpmKey = new PfConceptKey("modelKey", VERSION001);
DummyPfModel dpm = new DummyPfModel(dpmKey);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 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.
package org.onap.policy.models.base;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfNameVersion;
/**
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfNameVersionTest {
+class PfNameVersionTest {
@Test
- public void testPfNameVersion() {
+ void testPfNameVersion() {
DummyPfNameVersion dnv0 = new DummyPfNameVersion();
DummyPfNameVersion dnv1 = new DummyPfNameVersion();
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfObject;
import org.onap.policy.models.base.testconcepts.DummyPfObjectComparator;
import org.onap.policy.models.base.testconcepts.DummyPfObjectFilter;
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfObjectFilterTest {
+class PfObjectFilterTest {
private static final String NAME1 = "name1";
private static final String NAME0 = "name0";
private static final String VERSION002 = "0.0.2";
@Test
- public void testPfObjectInterface() {
+ void testPfObjectInterface() {
DummyPfObjectFilter dof = new DummyPfObjectFilter();
assertFalse(dof.filterString(HELLO, "Goodbye"));
assertTrue(dof.filterString(HELLO, HELLO));
}
@Test
- public void testStringFilteredPfObjectInterface() {
+ void testStringFilteredPfObjectInterface() {
List<DummyPfObject> doList = getListPfObject();
MyFilter filter = new MyFilter();
}
@Test
- public void testPrefixFilteredPfObjectInterface() {
+ void testPrefixFilteredPfObjectInterface() {
DummyPfObject doNullVersion = new DummyPfObject();
MyFilter filter = new MyFilter();
}
@Test
- public void testRegexFilteredPfObjectInterface() {
+ void testRegexFilteredPfObjectInterface() {
List<DummyPfObject> doList = getListPfObject();
DummyPfObject do0 = doList.get(0);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.reflect.Field;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.parameters.ValidationResult;
-public class PfReferenceKeyTest {
+class PfReferenceKeyTest {
private static final String PARENT_LOCAL_NAME = "ParentLocalName";
private static final String NPKLN = "NPKLN";
private static final String VERSION001 = "0.0.1";
@Test
- public void testPfReferenceKeyNotNull() {
+ void testPfReferenceKeyNotNull() {
assertNotNull(new PfReferenceKey());
assertNotNull(new PfReferenceKey(new PfConceptKey()));
assertNotNull(new PfReferenceKey(new PfConceptKey(), LOCAL_NAME));
}
@Test
- public void testPfReferenceKey() {
+ void testPfReferenceKey() {
PfReferenceKey testReferenceKey = new PfReferenceKey();
testReferenceKey.setParentConceptKey(new PfConceptKey("PN", VERSION001));
assertEquals("PN:0.0.1", testReferenceKey.getParentConceptKey().getId());
}
@Test
- public void testMultiplePfReferenceKey() {
+ void testMultiplePfReferenceKey() {
PfReferenceKey testReferenceKey = setTestReferenceKey();
testReferenceKey.clean();
}
@Test
- public void testValidation() throws Exception {
+ void testValidation() throws Exception {
PfReferenceKey testReferenceKey = new PfReferenceKey();
testReferenceKey.setParentConceptKey(new PfConceptKey("PN", VERSION001));
assertEquals("PN:0.0.1", testReferenceKey.getParentConceptKey().getId());
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2021 Nordix Foundation.
+ * Copyright (C) 2021, 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.
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.time.Instant;
import java.util.Date;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class PfReferenceTimestampKeyTest {
+class PfReferenceTimestampKeyTest {
private static final String PARENT_LOCAL_NAME = "ParentLocalName";
private static final String LOCAL_NAME = "LocalName";
private static final Instant DEFAULT_TIMESTAMP = Instant.EPOCH;
@Test
- public void testPfReferenceTimestampKeyConstruct() {
+ void testPfReferenceTimestampKeyConstruct() {
assertThat(new PfReferenceTimestampKey().getReferenceKey().getLocalName()).isEqualTo(PfKey.NULL_KEY_NAME);
assertEquals(PfKey.NULL_KEY_NAME, new PfReferenceTimestampKey(new PfConceptKey()).getReferenceKey()
.getParentKeyName());
}
@Test
- public void testPfReferenceTimestampKey() {
+ void testPfReferenceTimestampKey() {
PfReferenceTimestampKey testReferenceKey = new PfReferenceTimestampKey();
testReferenceKey.setReferenceKey(new PfReferenceKey(new PfConceptKey("PN", VERSION001)));
assertEquals("PN:0.0.1", testReferenceKey.getReferenceKey().getParentConceptKey().getId());
}
@Test
- public void testNewerKey() {
+ void testNewerKey() {
PfReferenceTimestampKey key1 = new PfReferenceTimestampKey("ParentKeyName", VERSION001, PARENT_LOCAL_NAME,
LOCAL_NAME, Instant.ofEpochSecond(timeStamp));
PfReferenceTimestampKey key2 = new PfReferenceTimestampKey(key1);
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.testconcepts.DummyPfConcept;
-public class PfSearchableKeyTest {
+class PfSearchableKeyTest {
private static final String VERSION001 = "0.0.1";
private static final String ID_IS_NULL = "^id is marked .*on.*ull but is null$";
@Test
- public void testSearchableKey() {
+ void testSearchableKey() {
PfSearchableKey someKey0 = new PfSearchableKey();
assertEquals(PfSearchableKey.getNullKey(), someKey0);
assertTrue(someKey0.isNullKey());
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2021 Nordix Foundation.
+ * Copyright (C) 2019-2021, 2024 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import java.time.Instant;
import java.util.Date;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class PfTimestampKeyTest {
+class PfTimestampKeyTest {
private static final String VERSION001 = "0.0.1";
private static final String CONCEPT_IS_NULL = "^copyConcept is marked .*on.*ull but is null$";
private static final String NAME_IS_NULL = "^name is marked .*on.*ull but is null$";
private static final long timeStamp = 1574832537641L;
@Test
- public void testTimestampKey() {
+ void testTimestampKey() {
PfTimestampKey someKey0 = new PfTimestampKey();
assertEquals(PfTimestampKey.getNullKey(), someKey0);
assertTrue(someKey0.isNullKey());
}
@Test
- public void testTimestampKeyErrors() {
+ void testTimestampKeyErrors() {
assertThatThrownBy(() -> new PfTimestampKey((PfTimestampKey) null)).isInstanceOf(NullPointerException.class)
.hasMessageMatching(CONCEPT_IS_NULL);
assertThatThrownBy(() -> new PfTimestampKey(null, null, null)).isInstanceOf(NullPointerException.class)
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.base;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.Arrays;
import java.util.List;
import java.util.TreeMap;
import lombok.Getter;
import lombok.ToString;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
/**
* Test the PfUtils class.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class PfUtilsTest {
+class PfUtilsTest {
private static final String HELLO = "hello";
@Test
- public void testCompareObjects() {
+ void testCompareObjects() {
assertEquals(0, PfUtils.compareObjects(null, null));
assertEquals(-1, PfUtils.compareObjects(HELLO, null));
assertEquals(1, PfUtils.compareObjects(null, HELLO));
}
@Test
- public void testMapList() {
+ void testMapList() {
List<Object> resultList = PfUtils.mapList(null, item -> {
throw new RuntimeException("should not be invoked");
});
}
@Test
- public void testMapMap() {
+ void testMapMap() {
Map<String, String> resultMap = PfUtils.mapMap(null, item -> {
throw new RuntimeException("should not be invoked");
});
}
@Test
- public void testMakeCopy() {
+ void testMakeCopy() {
assertNull(PfUtils.makeCopy((MyObject) null));
NoCopyConstructor noCopyConstructor = new NoCopyConstructor();
MyObject origObject = new MyObject();
* ONAP
* ================================================================================
* Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 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.
import java.util.concurrent.atomic.AtomicBoolean;
import lombok.Getter;
import lombok.NonNull;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.parameters.BeanValidationResult;
import org.onap.policy.common.parameters.annotations.NotNull;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.models.base.validation.annotations.PfMin;
import org.onap.policy.models.base.validation.annotations.VerifyKey;
-public class PfValidatorTest {
+class PfValidatorTest {
private static final String KEY_FIELD = "key";
private static final String STRING_VALUE = "abc";
private PfValidator validator;
- @Before
- public void setUp() {
+ @BeforeEach
+ void setUp() {
validator = new PfValidator();
}
@Test
- public void testAddValidatorsValueValidator() {
+ void testAddValidatorsValueValidator() {
// verify that standard annotations work
StdAnnotation data = new StdAnnotation();
data.strValue = STRING_VALUE;
}
@Test
- public void testVerPfMin() {
+ void testVerPfMin() {
PfMinChecker data = new PfMinChecker();
data.intValue = 10;
assertThat(validator.validateTop("", data).getResult()).isNull();
}
@Test
- public void testVerCascadeBeanValidationResultStringObject() {
+ void testVerCascadeBeanValidationResultStringObject() {
CascadeChecker checker = new CascadeChecker();
checker.plain = new StdAnnotation();
}
@Test
- public void testVerKey() throws CoderException {
+ void testVerKey() throws CoderException {
FullKeyAnnot data = new FullKeyAnnot();
// not a key
}
@Test
- public void testXlateObject() {
+ void testXlateObject() {
assertThat(validator.xlate(null)).isNull();
assertThat(validator.xlate("hello")).isEqualTo("hello");
* ONAP
* ================================================================================
* Copyright (C) 2020-2021 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.
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
import lombok.AllArgsConstructor;
import lombok.NonNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.parameters.BeanValidationResult;
import org.onap.policy.common.parameters.ValidationResult;
import org.onap.policy.common.parameters.ValidationStatus;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
-public class ValidatedTest {
+class ValidatedTest {
private static final @NonNull String MY_FIELD = "myField";
private static final @NonNull String Q_KEY = "\"" + Validated.KEY_TOKEN + "\"";
private static final @NonNull String Q_VALUE = "\"" + Validated.VALUE_TOKEN + "\"";
private static final String VERSION = "1.0.0";
@Test
- public void testAddResult() {
+ void testAddResult() {
BeanValidationResult result = new BeanValidationResult("", this);
Validated.addResult(result, MY_FIELD, TEXT, "some message");
assertThat(result.getResult()).contains(MY_FIELD).contains(TEXT).contains("some message");
}
@Test
- public void testMakeNullResult() {
+ void testMakeNullResult() {
ValidationResult rnull = Validated.makeNullResult(MY_FIELD, TEXT);
assertEquals(MY_FIELD, rnull.getName());
assertThat(rnull.getResult()).contains(MY_FIELD).contains(TEXT).contains(Validated.IS_NULL);
}
@Test
- public void testValidateKeyNotNull() throws CoderException {
+ void testValidateKeyNotNull() throws CoderException {
BeanValidationResult result = new BeanValidationResult("", this);
Validated.validateKeyNotNull(result, MY_FIELD, new PfConceptKey(NAME, VERSION));
assertThat(result.getResult()).isNull();
}
@Test
- public void testValidateKeyVersionNotNull() {
+ void testValidateKeyVersionNotNull() {
BeanValidationResult result = new BeanValidationResult("", this);
Validated.validateKeyVersionNotNull(result, MY_FIELD, null);
assertThat(result.getResult()).isNull();
}
@Test
- public void testGetKeyId() {
+ void testGetKeyId() {
// not a key field - should just use the given value
BeanValidationResult result = new BeanValidationResult("", this);
Validated.addResult(result, MY_FIELD, TEXT, "some message");
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.dao;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-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 java.util.Properties;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.dao.converters.CDataConditioner;
import org.onap.policy.models.dao.converters.Uuid2String;
-public class DaoMiscTest {
+class DaoMiscTest {
private static final String SOMEWHERE_OVER_THE_RAINBOW = "somewhere.over.the.rainbow";
@Test
- public void testUuid2StringMopUp() {
+ void testUuid2StringMopUp() {
final Uuid2String uuid2String = new Uuid2String();
assertEquals("", uuid2String.convertToDatabaseColumn(null));
}
@Test
- public void testCDataConditionerMopUp() {
+ void testCDataConditionerMopUp() {
assertNull(CDataConditioner.clean(null));
}
@Test
- public void testDaoFactory() {
+ void testDaoFactory() {
final DaoParameters daoParameters = new DaoParameters();
daoParameters.setPluginClass(SOMEWHERE_OVER_THE_RAINBOW);
}
@Test
- public void testDaoParameters() {
+ void testDaoParameters() {
final DaoParameters pars = new DaoParameters();
pars.setJdbcProperties(new Properties());
assertEquals(0, pars.getJdbcProperties().size());
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Set;
import java.util.TreeSet;
import java.util.UUID;
-import org.junit.After;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.PfConceptKey;
import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfReferenceKey;
/**
* JUnit test class.
*/
-public class EntityTest {
+class EntityTest {
private static final String DESCRIPTION2 = "key description 2";
private static final String DESCRIPTION1 = "key description 1";
private static final String DESCRIPTION0 = "key description 0";
private static final Instant TIMESTAMP1 = Instant.ofEpochSecond(1613494293).plusSeconds(55);
private static final Instant TIMESTAMP2 = Instant.ofEpochSecond(1613494293).plusSeconds(90);
- private PfDao pfDao;
+ private static PfDao pfDao;
/**
* Closes the DAO.
*/
- @After
- public void tearDown() {
+ @AfterAll
+ public static void tearDown() {
if (pfDao != null) {
pfDao.close();
pfDao = null;
}
@Test
- public void testEntityTestSanity() throws PfModelException {
+ void testEntityTestSanity() throws PfModelException {
final DaoParameters daoParameters = new DaoParameters();
Properties jdbcProperties = new Properties();
}
@Test
- public void testEntityTestAllOpsJpa() throws PfModelException {
+ void testEntityTestAllOpsJpa() throws PfModelException {
final DaoParameters daoParameters = new DaoParameters();
daoParameters.setPluginClass(DefaultPfDao.class.getName());
}
@Test
- public void testEntityTestBadVals() throws PfModelException {
+ void testEntityTestBadVals() throws PfModelException {
final DaoParameters daoParameters = new DaoParameters();
daoParameters.setPluginClass(DefaultPfDao.class.getName());
daoParameters.setPersistenceUnit("DaoTest");
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * 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.
package org.onap.policy.models.dao.converters;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
/**
* Test the CDataConditioner Class.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class CDataConditionerTest {
+class CDataConditionerTest {
@Test
- public void testCDataConditioner() throws Exception {
+ void testCDataConditioner() throws Exception {
assertEquals("Raw", new CDataConditioner().convertToDatabaseColumn("Raw"));
assertEquals("entityAttribute", new CDataConditioner().convertToEntityAttribute("entityAttribute"));
assertEquals("marshal", new CDataConditioner().marshal("marshal"));
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * 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.
package org.onap.policy.models.dao.converters;
-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;
/**
* Test the UUID conditioner class.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class Uuid2StringConditionerTest {
+class Uuid2StringConditionerTest {
@Test
- public void testUuidConditioner() throws Exception {
+ void testUuidConditioner() throws Exception {
UUID randomUuid = UUID.randomUUID();
assertEquals(randomUuid.toString(), new Uuid2String().convertToDatabaseColumn(randomUuid));
assertEquals(randomUuid, new Uuid2String().convertToEntityAttribute(randomUuid.toString()));
* ONAP Policy Decision Models
* ================================================================================
* 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.
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 TestModels {
+class TestModels {
@Test
- public void testDecisionModels() {
+ void testDecisionModels() {
final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester())
.with(new GetterTester()).build();
validator.validate(TestModels.class.getPackage().getName(), new FilterPackageInfo());
* ONAP Policy Decision Models
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023, 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.
package org.onap.policy.models.errors.concepts;
import static org.assertj.core.api.Assertions.assertThatCode;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import jakarta.ws.rs.core.Response;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ErrorResponseTest {
+class ErrorResponseTest {
- public static final Logger logger = LoggerFactory.getLogger(ErrorResponseTest.class);
+ static final Logger logger = LoggerFactory.getLogger(ErrorResponseTest.class);
@Test
- public void test() {
+ void test() {
assertThatCode(() -> {
ErrorResponse error = new ErrorResponse();
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 Nordix Foundation.
+ * Copyright (C) 2019-2020, 2024 Nordix Foundation.
* Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.errors.concepts;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
/**
* Test the {@link ErrorResponseUtils} class.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
-public class ErrorResponseUtilsTest {
+class ErrorResponseUtilsTest {
private static final String EXCEPTION1 = "Exception 1";
@Test
- public void testErrorResponseUtils() {
+ void testErrorResponseUtils() {
final IOException ioe = new IOException(EXCEPTION1, new NumberFormatException("Exception 0"));
final ErrorResponse errorResponse = new ErrorResponse();
assertThat(ioe).hasMessage(EXCEPTION1);
* ONAP Policy Decision Models
* ================================================================================
* 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.
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 TestModels {
+class TestModels {
@Test
- public void testDecisionModels() {
+ void testDecisionModels() {
final Validator validator = ValidatorBuilder.create().with(new ToStringTester()).with(new SetterTester())
.with(new GetterTester()).build();
validator.validate(TestModels.class.getPackage().getName(), new FilterPackageInfo());