JUnit 4 tests do not fire when JUnit 5 is activated.
Issue-ID: POLICY-3452
Change-Id: I5efb8ee996b06dc7f57107b8f77408adc1a4f22f
Signed-off-by: liamfallon <liam.fallon@est.tech>
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ClElementStatisticsTest {
+class ClElementStatisticsTest {
@Test
- public void testClElementStatisticsLombok() {
+ void testClElementStatisticsLombok() {
assertNotNull(new ClElementStatistics());
ClElementStatistics cles0 = new ClElementStatistics();
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class ControlLoopConceptPojosTest {
+class ControlLoopConceptPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(ControlLoopConceptPojosTest.class.getPackageName());
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopElementTest {
+class ControlLoopElementTest {
@Test
- public void testControlLoopElement() {
+ void testControlLoopElement() {
ControlLoopElement cle0 = new ControlLoopElement();
}
@Test
- public void testControlLoopElementLombok() {
+ void testControlLoopElementLombok() {
assertNotNull(new ControlLoopElement());
ControlLoopElement cle0 = new ControlLoopElement();
import java.util.LinkedHashMap;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.base.PfKey;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopTest {
+class ControlLoopTest {
@Test
- public void testControlLoop() {
+ void testControlLoop() {
ControlLoop cl0 = new ControlLoop();
cl0.setDefinition(new ToscaConceptIdentifier("dfName", "1.2.3"));
assertEquals("dfName", cl0.getType());
}
@Test
- public void testControlLoopLombok() {
+ void testControlLoopLombok() {
assertNotNull(new ControlLoop());
ControlLoop cl0 = new ControlLoop();
cl0.setElements(new LinkedHashMap<>());
import static org.junit.Assert.assertNotNull;
import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatisticsTest {
+class ParticipantStatisticsTest {
@Test
- public void testParticipantStatisticsLombok() {
+ void testParticipantStatisticsLombok() {
assertNotNull(new ParticipantStatistics());
ParticipantStatistics ps0 = new ParticipantStatistics();
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantTest {
+class ParticipantTest {
@Test
- public void testParticipant() {
+ void testParticipant() {
Participant p0 = new Participant();
p0.setDefinition(new ToscaConceptIdentifier("dfName", "1.2.3"));
}
@Test
- public void testParticipantLombok() {
+ void testParticipantLombok() {
assertNotNull(new Participant());
Participant p0 = new Participant();
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
/**
* Test the {@link JpaClElementStatistics} class.
*/
-public class JpaClElementStatisticsTest {
+class JpaClElementStatisticsTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaClElementStatisticsConstructor() {
+ void testJpaClElementStatisticsConstructor() {
assertThatThrownBy(() -> {
new JpaClElementStatistics((JpaClElementStatistics) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
}
@Test
- public void testJpaClElementStatistics() {
+ void testJpaClElementStatistics() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
ClElementStatistics cles = createClElementStatisticsInstance();
}
@Test
- public void testJpaClElementStatisticsValidation() {
+ void testJpaClElementStatisticsValidation() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
assertThatThrownBy(() -> {
}
@Test
- public void testJpaClElementStatisticsCompareTo() {
+ void testJpaClElementStatisticsCompareTo() {
JpaClElementStatistics testJpaClElementStatistics = createJpaClElementStatisticsInstance();
JpaClElementStatistics otherJpaClElementStatistics = new JpaClElementStatistics(testJpaClElementStatistics);
}
@Test
- public void testJpaClElementStatisticsLombok() {
+ void testJpaClElementStatisticsLombok() {
assertNotNull(new Participant());
JpaClElementStatistics cles0 = new JpaClElementStatistics();
import java.io.File;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopElement;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
/**
* Test the {@link JpaControlLoopElement} class.
*/
-public class JpaControlLoopElementTest {
+class JpaControlLoopElementTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaControlLoopElementConstructor() {
+ void testJpaControlLoopElementConstructor() {
assertThatThrownBy(() -> {
new JpaControlLoopElement((JpaControlLoopElement) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
}
@Test
- public void testJpaControlLoopElement() {
+ void testJpaControlLoopElement() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
ControlLoopElement cle = createControlLoopElementInstance();
}
@Test
- public void testJpaControlLoopElementOrderedState() throws CoderException {
+ void testJpaControlLoopElementOrderedState() throws CoderException {
ControlLoopElement testControlLoopElement = createControlLoopElementInstance();
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
}
@Test
- public void testJpaControlLoopElementValidation() {
+ void testJpaControlLoopElementValidation() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
assertThatThrownBy(() -> {
}
@Test
- public void testJpaControlLoopElementCompareTo() {
+ void testJpaControlLoopElementCompareTo() {
JpaControlLoopElement testJpaControlLoopElement = createJpaControlLoopElementInstance();
JpaControlLoopElement otherJpaControlLoopElement = new JpaControlLoopElement(testJpaControlLoopElement);
}
@Test
- public void testJpaControlLoopElementLombok() {
+ void testJpaControlLoopElementLombok() {
assertNotNull(new Participant());
JpaControlLoopElement cle0 = new JpaControlLoopElement();
import java.io.File;
import java.util.LinkedHashMap;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopState;
/**
* Test the {@link JpaControlLoopTest} class.
*/
-public class JpaControlLoopTest {
+class JpaControlLoopTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaControlLoopConstructor() {
+ void testJpaControlLoopConstructor() {
assertThatThrownBy(() -> {
new JpaControlLoop((JpaControlLoop) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
}
@Test
- public void testJpaControlLoop() {
+ void testJpaControlLoop() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
ControlLoop participant = createControlLoopInstance();
}
@Test
- public void testJpaControlLoopElementOrderedState() throws CoderException {
+ void testJpaControlLoopElementOrderedState() throws CoderException {
ControlLoop testControlLoop = createControlLoopInstance();
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
}
@Test
- public void testJpaControlLoopValidation() {
+ void testJpaControlLoopValidation() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
assertThatThrownBy(() -> {
}
@Test
- public void testJpaControlLoopCompareTo() {
+ void testJpaControlLoopCompareTo() {
JpaControlLoop testJpaControlLoop = createJpaControlLoopInstance();
JpaControlLoop otherJpaControlLoop = new JpaControlLoop(testJpaControlLoop);
}
@Test
- public void testJpaControlLoopLombok() {
+ void testJpaControlLoopLombok() {
assertNotNull(new ControlLoop());
JpaControlLoop cl0 = new JpaControlLoop();
import static org.junit.Assert.assertTrue;
import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantHealthStatus;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
/**
* Test the {@link JpaParticipantStatistics} class.
*/
-public class JpaParticipantStatisticsTest {
+class JpaParticipantStatisticsTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaParticipantStatisticsConstructor() {
+ void testJpaParticipantStatisticsConstructor() {
assertThatThrownBy(() -> {
new JpaParticipantStatistics((JpaParticipantStatistics) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
}
@Test
- public void testJpaParticipantStatistics() {
+ void testJpaParticipantStatistics() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
ParticipantStatistics cles = createParticipantStatisticsInstance();
}
@Test
- public void testJpaParticipantStatisticsValidation() {
+ void testJpaParticipantStatisticsValidation() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
assertThatThrownBy(() -> {
}
@Test
- public void testJpaParticipantStatisticsConmpareTo() {
+ void testJpaParticipantStatisticsConmpareTo() {
JpaParticipantStatistics testJpaParticipantStatistics = createJpaParticipantStatisticsInstance();
JpaParticipantStatistics otherJpaParticipantStatistics =
}
@Test
- public void testJpaParticipantStatisticsLombok() {
+ void testJpaParticipantStatisticsLombok() {
assertNotNull(new Participant());
JpaParticipantStatistics ps0 = new JpaParticipantStatistics();
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantHealthStatus;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
/**
* Test the {@link JpaParticiant} class.
*/
-public class JpaParticipantTest {
+class JpaParticipantTest {
private static final String NULL_KEY_ERROR = "key is marked .*ull but is null";
@Test
- public void testJpaParticipantConstructor() {
+ void testJpaParticipantConstructor() {
assertThatThrownBy(() -> {
new JpaParticipant((JpaParticipant) null);
}).hasMessageMatching("copyConcept is marked .*ull but is null");
}
@Test
- public void testJpaParticipant() {
+ void testJpaParticipant() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
Participant participant = createParticipantInstance();
}
@Test
- public void testJpaParticipantValidation() {
+ void testJpaParticipantValidation() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
assertThatThrownBy(() -> {
}
@Test
- public void testJpaParticipantCompareTo() {
+ void testJpaParticipantCompareTo() {
JpaParticipant testJpaParticipant = createJpaParticipantInstance();
JpaParticipant otherJpaParticipant = new JpaParticipant(testJpaParticipant);
}
@Test
- public void testJpaParticipantLombok() {
+ void testJpaParticipantLombok() {
assertNotNull(new Participant());
JpaParticipant p0 = new JpaParticipant();
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class PojosTest {
+class PojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(PojosTest.class.getPackageName());
import java.time.Instant;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ClElementStatisticsList;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ClElementStatisticsProviderTest {
+class ClElementStatisticsProviderTest {
private static final String LIST_IS_NULL = ".*. is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
private static final String CL_ELEMENT_STATS_JSON = "src/test/resources/providers/TestClElementStatistics.json";
*
* @throws Exception on errors
*/
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
inputClElementStats = CODER.decode(originalJson, ClElementStatisticsList.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
clElementStatisticsProvider.close();
}
@Test
- public void testClElementStatisticsCreate() throws Exception {
+ void testClElementStatisticsCreate() throws Exception {
assertThatThrownBy(() -> {
clElementStatisticsProvider.createClElementStatistics(null);
}).hasMessageMatching(LIST_IS_NULL);
}
@Test
- public void testGetClElementStatistics() throws Exception {
+ void testGetClElementStatistics() throws Exception {
List<ClElementStatistics> getResponse;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoops;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
-public class ControlLoopProviderTest {
+class ControlLoopProviderTest {
private static final String LIST_IS_NULL = "controlLoops is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
private String originalJson = ResourceUtils.getResourceAsString(CONTROL_LOOP_JSON);
private String updateClJson = ResourceUtils.getResourceAsString(UPDATE_CL_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
updateControlLoops = CODER.decode(updateClJson, ControlLoops.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
controlLoopProvider.close();
}
@Test
- public void testControlLoopCreate() throws Exception {
+ void testControlLoopCreate() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.createControlLoops(null);
}).hasMessageMatching(LIST_IS_NULL);
}
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<ControlLoop> getResponse;
}
@Test
- public void testUpdateControlLoops() throws Exception {
+ void testUpdateControlLoops() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.updateControlLoops(null);
}).hasMessageMatching("controlLoops is marked .*ull but is null");
}
@Test
- public void testDeleteControlLoop() throws Exception {
+ void testDeleteControlLoop() throws Exception {
assertThatThrownBy(() -> {
controlLoopProvider.deleteControlLoop("Invalid_name", "1.0.1");
}).hasMessageMatching(".*.failed, control loop does not exist");
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.Participant;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaTypedEntityFilter;
-public class ParticipantProviderTest {
+class ParticipantProviderTest {
private static final Coder CODER = new StandardCoder();
private static final String PARTICIPANT_JSON =
private Participant updateParticipants;
private String originalJson = ResourceUtils.getResourceAsString(PARTICIPANT_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
participantProvider.close();
}
@Test
- public void testParticipantCreate() throws Exception {
+ void testParticipantCreate() throws Exception {
assertThatThrownBy(() -> {
participantProvider.createParticipants(null);
}).hasMessageMatching(LIST_IS_NULL);
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<Participant> getResponse;
}
@Test
- public void testUpdateParticipant() throws Exception {
+ void testUpdateParticipant() throws Exception {
assertThatThrownBy(() -> {
participantProvider.updateParticipants(null);
}).hasMessageMatching("participants is marked .*ull but is null");
}
@Test
- public void testDeleteParticipant() throws Exception {
+ void testDeleteParticipant() throws Exception {
assertThatThrownBy(() -> {
participantProvider.deleteParticipant("Invalid_name", "1.0.1");
}).hasMessageMatching(".*.failed, participant does not exist");
import java.time.Instant;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantStatistics;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantStatisticsList;
import org.onap.policy.common.utils.coder.Coder;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatisticsProviderTest {
+class ParticipantStatisticsProviderTest {
private static final String LIST_IS_NULL = ".*. is marked .*ull but is null";
private static final Coder CODER = new StandardCoder();
private ParticipantStatisticsList inputParticipantStatistics;
private String originalJson = ResourceUtils.getResourceAsString(PARTICIPANT_STATS_JSON);
- @Before
- public void beforeSetupDao() throws Exception {
+ @BeforeEach
+ void beforeSetupDao() throws Exception {
parameters = new PolicyModelsProviderParameters();
parameters.setDatabaseDriver("org.h2.Driver");
inputParticipantStatistics = CODER.decode(originalJson, ParticipantStatisticsList.class);
}
- @After
- public void teardown() {
+ @AfterEach
+ void teardown() {
participantStatisticsProvider.close();
}
@Test
- public void testParticipantStatisticsCreate() throws Exception {
+ void testParticipantStatisticsCreate() throws Exception {
assertThatThrownBy(() -> {
participantStatisticsProvider.createParticipantStatistics(null);
}).hasMessageMatching(LIST_IS_NULL);
}
@Test
- public void testGetControlLoops() throws Exception {
+ void testGetControlLoops() throws Exception {
List<ParticipantStatistics> getResponse;
// Return empty list when no data present in db
import java.util.ArrayList;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
-public class ControlLoopNotificationTest {
+class ControlLoopNotificationTest {
@Test
- public void testControlLoopNotification() {
+ void testControlLoopNotification() {
ControlLoopNotification cln0 = new ControlLoopNotification();
List<ControlLoopStatus> addedList = new ArrayList<>();
}
@Test
- public void testControlLoopNotificationLombok() {
+ void testControlLoopNotificationLombok() {
assertNotNull(new ControlLoopNotification());
assertNotNull(new ControlLoopNotification(new ArrayList<>(), new ArrayList<>()));
import static org.junit.Assert.assertNotNull;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ControlLoopStatusTest {
+class ControlLoopStatusTest {
@Test
- public void testControlLoopStatusLombok() {
+ void testControlLoopStatusLombok() {
assertNotNull(new ControlLoopStatus());
assertNotNull(new ControlLoopStatus(UUID.randomUUID(), new ToscaConceptIdentifier()));
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class NotificationPojosTest {
+class NotificationPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(NotificationPojosTest.class.getPackageName());
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and other methods.
*/
-public class ParticipantControlLoopStateChangeTest {
+class ParticipantControlLoopStateChangeTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantControlLoopStateChange orig = new ParticipantControlLoopStateChange();
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoop;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate;
/**
* Test the copy constructor.
*/
-public class ParticipantControlLoopUpdateTest {
+class ParticipantControlLoopUpdateTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantControlLoopUpdate(null)).isInstanceOf(NullPointerException.class);
ParticipantControlLoopUpdate orig = new ParticipantControlLoopUpdate();
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and other methods.
*/
-public class ParticipantHealthCheckTest {
+class ParticipantHealthCheckTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantHealthCheck orig = new ParticipantHealthCheck();
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantMessageTest {
+class ParticipantMessageTest {
private ParticipantMessage message;
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantMessage((ParticipantMessage) null))
.isInstanceOf(NullPointerException.class);
}
@Test
- public void testAppliesTo_NullParticipantId() {
+ void testAppliesTo_NullParticipantId() {
message = makeMessage();
assertThatThrownBy(() -> message.appliesTo(null, null)).isInstanceOf(NullPointerException.class);
}
@Test
- public void testAppliesTo_ParticipantIdMatches() {
+ void testAppliesTo_ParticipantIdMatches() {
message = makeMessage();
// ParticipantId matches
}
@Test
- public void testAppliesTo_ParticipantIdNoMatch() {
+ void testAppliesTo_ParticipantIdNoMatch() {
message = makeMessage();
// ParticipantId does not match
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class ParticipantPojosTest {
+class ParticipantPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClasses(ParticipantPojosTest.class.getPackageName());
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
/**
* Test the copy constructor and the other methods.
*/
-public class ParticipantStateChangeTest {
+class ParticipantStateChangeTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStateChange(null)).isInstanceOf(NullPointerException.class);
ParticipantStateChange orig = new ParticipantStateChange();
import java.time.Instant;
import java.util.UUID;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ParticipantState;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
-public class ParticipantStatusTest {
+class ParticipantStatusTest {
@Test
- public void testCopyConstructor() {
+ void testCopyConstructor() {
assertThatThrownBy(() -> new ParticipantStatus(null)).isInstanceOf(NullPointerException.class);
final ParticipantStatus orig = new ParticipantStatus();
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.List;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.common.utils.test.ToStringTester;
/**
* Class to perform unit tests of all pojos.
*/
-public class MessagesRestPojosTest {
+class MessagesRestPojosTest {
@Test
- public void testPojos() {
+ void testPojos() {
List<PojoClass> pojoClasses =
PojoClassFactory.getPojoClassesRecursively(MessagesRestPojosTest.class.getPackageName(), null);
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState;
-public class InstantiationCommandTest {
+class InstantiationCommandTest {
@Test
- public void testInstantiationCommandLombok() {
+ void testInstantiationCommandLombok() {
assertNotNull(new InstantiationCommand());
InstantiationCommand ic0 = new InstantiationCommand();