diff options
Diffstat (limited to 'huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java')
-rw-r--r-- | huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java index af97c25a..88855d01 100644 --- a/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java +++ b/huawei/vnfmadapter/VnfmadapterService/service/src/test/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/process/AuthMgrTest.java @@ -45,20 +45,11 @@ public class AuthMgrTest { @Test public void testAuthToken() { -// new MockUp<VnfmRestfulUtil>() { -// -// @Mock -// public RestfulResponse getRestResByDefault(String auth, String method, JSONObject authParams) { -// RestfulResponse response = null; -// return response; -// } -// }; AuthMgr authMgr = new AuthMgr(); - String data = "{\"auth\":{\"identity\":{\"password\":{\"user\":{\"name\":\"om_team\",\"password\":\"123\"}}}}}"; - JSONObject params = JSONObject.fromObject(data); - + JSONObject params = new JSONObject(); + params.put(Constant.USERNAME, Constant.USERNAME); JSONObject result = authMgr.authToken(params); - assertEquals(Constant.REST_FAIL, result.getInt("retCode")); + assertEquals(Constant.REST_SUCCESS, result.getInt("retCode")); } } |