style of test now matches 81/109381/2
authorBenjamin, Max <max.benjamin@att.com>
Fri, 19 Jun 2020 21:07:01 +0000 (17:07 -0400)
committerBenjamin, Max (mb388a) <mb388a@att.com>
Tue, 23 Jun 2020 16:04:07 +0000 (12:04 -0400)
updated unit test to match other tests in the codebase

Issue-ID: SO-2992
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: Icf844d9c07105d23646681a3b29eeae06a03e91c

bpmn/so-bpmn-tasks/pom.xml
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListener.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipConfigVnfListenerTest.java

index e510a29..dec9560 100644 (file)
                     </execute>
                   </action>
                 </pluginExecution>
-                  <pluginExecution>
+                <pluginExecution>
                   <pluginExecutionFilter>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-dependency-plugin</artifactId>
                     <execute />
                   </action>
                 </pluginExecution>
-                  <pluginExecution>
+                <pluginExecution>
                   <pluginExecutionFilter>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>build-helper-maven-plugin</artifactId>
index c23fb03..64c42fa 100644 (file)
@@ -21,7 +21,6 @@
 package org.onap.so.bpmn.infrastructure.workflow.tasks.listeners;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -30,6 +29,11 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
 import org.camunda.bpm.extension.mockito.delegate.DelegateExecutionFake;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Spy;
+import org.mockito.junit.MockitoJUnitRunner;
 import org.onap.so.bpmn.common.BuildingBlockExecution;
 import org.onap.so.bpmn.common.DelegateExecutionImpl;
 import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
@@ -39,6 +43,7 @@ import org.onap.so.db.catalog.client.CatalogDbClient;
 import org.onap.so.serviceinstancebeans.ModelInfo;
 import org.onap.so.serviceinstancebeans.RequestDetails;
 
+@RunWith(MockitoJUnitRunner.class)
 public class SkipConfigVnfListenerTest {
 
     private static final String MODEL_UUID = "modelUuidTest";
@@ -46,7 +51,9 @@ public class SkipConfigVnfListenerTest {
     private static final String G_CURRENT_SEQUENCE = "gCurrentSequence";
 
     private DelegateExecution execution;
+    @Mock
     private CatalogDbClient catalogDbClientMock;
+    @InjectMocks
     private SkipConfigVnfListener testedObject;
     private BuildingBlockExecution buildingBlockExecution;
 
@@ -54,8 +61,6 @@ public class SkipConfigVnfListenerTest {
     public void setup() {
         execution = new DelegateExecutionFake();
         buildingBlockExecution = new DelegateExecutionImpl(execution);
-        catalogDbClientMock = mock(CatalogDbClient.class);
-        testedObject = new SkipConfigVnfListener(catalogDbClientMock);
     }
 
     @Test