Convert models to JUnit 5
[policy/models.git] / models-tosca / src / test / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaTimeIntervalTest.java
index 7e8b781..92a5972 100644 (file)
@@ -2,6 +2,7 @@
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2019-2021 Nordix Foundation.
  *  Modifications Copyright (C) 2019-2020 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.
 package org.onap.policy.models.tosca.simple.concepts;
 
 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.sql.Timestamp;
 import java.time.Instant;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.onap.policy.models.base.PfConceptKey;
 import org.onap.policy.models.base.PfReferenceKey;
 
@@ -39,12 +40,12 @@ import org.onap.policy.models.base.PfReferenceKey;
  *
  * @author Liam Fallon (liam.fallon@est.tech)
  */
-public class JpaToscaTimeIntervalTest {
+class JpaToscaTimeIntervalTest {
 
     private static final String KEY_IS_NULL = "key is marked .*on.*ull but is null";
 
     @Test
-    public void testTimeIntervalPojo() {
+    void testTimeIntervalPojo() {
         assertNotNull(new JpaToscaTimeInterval());
         assertNotNull(new JpaToscaTimeInterval(new PfReferenceKey()));
         assertNotNull(new JpaToscaTimeInterval(new PfReferenceKey(), Instant.now(), Instant.now()));
@@ -75,7 +76,7 @@ public class JpaToscaTimeIntervalTest {
     }
 
     @Test
-    public void testTimeInterval() {
+    void testTimeInterval() {
         PfConceptKey ttiParentKey = new PfConceptKey("tParentKey", "0.0.1");
         PfReferenceKey ttiKey = new PfReferenceKey(ttiParentKey, "trigger0");
         Instant startTime = Instant.ofEpochSecond(1000);
@@ -114,7 +115,7 @@ public class JpaToscaTimeIntervalTest {
     }
 
     @Test
-    public void testTimeIntervalValidation() {
+    void testTimeIntervalValidation() {
         Instant startTime = Instant.ofEpochSecond(1000);
         Instant endTime = Instant.ofEpochSecond(2000);
         JpaToscaTimeInterval tti = setUpJpaToscaTimeInterval(startTime, endTime);