diff options
author | 2018-03-19 15:43:45 +0000 | |
---|---|---|
committer | 2018-03-19 15:43:45 +0000 | |
commit | dcdf1bb1838de59e16c63ab37b29fb913efe2f69 (patch) | |
tree | 466a5229e7dfe6d563250724f32f003da34df7b5 /ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java | |
parent | f4ab057f93e89b13ed5923d8efe9ef8f880335bc (diff) | |
parent | 7c1af671d0722b775047a4abf7e7ad7a151d65c6 (diff) |
Merge "Added Junits"
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java index 0eef07d9..2a82429d 100644 --- a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java +++ b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/model/SearchHandlerTest.java @@ -44,6 +44,7 @@ package org.onap.portalsdk.analytics.model; import org.junit.Assert; +import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; @@ -123,11 +124,19 @@ public class SearchHandlerTest { @Before public void init() throws Exception { + PowerMockito.mockStatic(Globals.class); PowerMockito.mockStatic(AppUtils.class); PowerMockito.mockStatic(DbUtils.class); MockitoAnnotations.initMocks(this); + + + + FileWriter myFile = PowerMockito.mock(FileWriter.class); + PowerMockito.whenNew(FileWriter.class).withAnyArguments().thenReturn(myFile); + + PowerMockito.when(Globals.getAppUtils()).thenReturn(iAppUtils); PowerMockito.when(AppUtils.getImgFolderURL()).thenReturn("http://sometesturl:9090/hi"); |