aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorDmitry Puzikov <dmitry.puzikov@tieto.com>2019-07-09 16:06:02 +0200
committerDmitry Puzikov <dmitry.puzikov@tieto.com>2019-08-21 09:36:44 +0200
commit7c03e5855fb667a01d9375b445c4a04919bd1dbb (patch)
tree39f5e81113cac07dbb8076781a06ceb01128e80b /src/test/java/org
parent6c61db25f45369d0b97345db9aa86589603c151d (diff)
Fix dockerfile to reflect common image naming
FROM section changed to reflerct new aai-common image naming scheme. Added explicit aai-common version parameter. Change-Id: Ifc1187384ce757f1a2bf852a670dd9d706a4c782 Issue-ID: INT-1141 Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java39
1 files changed, 22 insertions, 17 deletions
diff --git a/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java b/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java
index b28ba3a..5cb8dc6 100644
--- a/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java
+++ b/src/test/java/org/onap/crud/event/response/GraphEventResponseHandlerTest.java
@@ -20,11 +20,15 @@
*/
package org.onap.crud.event.response;
-import static org.assertj.core.api.Assertions.assertThat;
-import org.junit.BeforeClass;
+import com.google.gson.Gson;
+import com.google.gson.JsonParser;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.crud.OXMModelLoaderSetup;
import org.onap.crud.event.GraphEvent;
import org.onap.crud.event.GraphEvent.GraphEventOperation;
import org.onap.crud.event.envelope.GraphEventEnvelope;
@@ -32,29 +36,30 @@ import org.onap.crud.exception.CrudException;
import org.onap.crud.util.TestUtil;
import org.onap.schema.EdgeRulesLoader;
import org.onap.schema.OxmModelLoader;
-import com.google.gson.Gson;
-import com.google.gson.JsonParser;
-import org.junit.runner.RunWith;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.crud.OXMModelLoaderSetup;
+import static org.assertj.core.api.Assertions.assertThat;
@RunWith(MockitoJUnitRunner.Silent.class)
public class GraphEventResponseHandlerTest extends OXMModelLoaderSetup {
+ private static boolean setUpIsNotDone = true;
+
+ @Before
+ public void setUpOnce() throws CrudException {
+ if (setUpIsNotDone) {
+ System.setProperty("CONFIG_HOME", "src/test/resources");
+ System.setProperty("AJSC_HOME", ".");
+ System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local");
+
+ OxmModelLoader.loadModels();
+ EdgeRulesLoader.loadModels();
+
+ setUpIsNotDone = false;
+ }
+ }
@Rule
public ExpectedException expectedException = ExpectedException.none();
- @BeforeClass
- public static void setUpBeforeClass() throws Exception {
- System.setProperty("CONFIG_HOME", "src/test/resources");
- System.setProperty("AJSC_HOME", ".");
- System.setProperty("BUNDLECONFIG_DIR", "src/test/resources/bundleconfig-local");
-
- OxmModelLoader.loadModels();
- EdgeRulesLoader.loadModels();
- }
-
@Test
public void testPolicyViolationsNotDetected() throws Exception {
String expectedEnvelope = TestUtil.getFileAsString("event/event-envelope-sentinel-no-violations.json");