Fix for Feature Toggle rest module 47/29947/1
authorsiddharth0905 <siddharth.singh4@amdocs.com>
Thu, 1 Feb 2018 06:44:27 +0000 (12:14 +0530)
committersiddharth0905 <siddharth.singh4@amdocs.com>
Thu, 1 Feb 2018 06:44:27 +0000 (12:14 +0530)
With this change we will be able to Mock enum as well

Change-Id: I61321c54ae458a93398eacb1a43ae22ce755e793
Issue-ID: SDC-988
Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/pom.xml
openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/test/java/org/openecomp/TogglzFeatureRestTest.java
openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker [new file with mode: 0644]

index baad898..21f5223 100644 (file)
@@ -58,9 +58,9 @@
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-all</artifactId>
+            <artifactId>mockito-core</artifactId>
             <scope>test</scope>
-            <version>${mockito.all.version}</version>
+            <version>${mockito.version}</version>
         </dependency>
     </dependencies>
 
index b8f3286..8170048 100644 (file)
@@ -27,7 +27,7 @@ public class TogglzFeatureRestTest {
 
     @Test
     public void shouldConvertDataProperly() {
-        ToggleStatus tf = mock(ToggleStatus.class);
+        ToggleableFeature tf = mock(ToggleableFeature.class);
         final String TF_NAME = "tf";
         final boolean ACTIVE = true;
         when(tf.name()).thenReturn(TF_NAME);
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
new file mode 100644 (file)
index 0000000..ca6ee9c
--- /dev/null
@@ -0,0 +1 @@
+mock-maker-inline
\ No newline at end of file