X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-service%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fservice%2Ftest%2FJU_ServiceImpl_createUserCred.java;h=9cd5ecdfbd074cbc226c5ca01c92d3f45707403e;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=2bb907ac313b071182ec2b2e202f71f9649a51ff;hpb=bdce7667a6e272e2fa32e298d957a0d9090c5bc9;p=aaf%2Fauthz.git diff --git a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java index 2bb907ac..9cd5ecdf 100644 --- a/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java +++ b/auth/auth-service/src/test/java/org/onap/aaf/auth/service/test/JU_ServiceImpl_createUserCred.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -49,9 +49,9 @@ import junit.framework.Assert; @RunWith(MockitoJUnitRunner.class) public class JU_ServiceImpl_createUserCred extends JU_BaseServiceImpl { - @Mock - private Result rcdd; - + @Mock + private Result rcdd; + @Before public void setUp() throws Exception { super.setUp(); @@ -110,7 +110,7 @@ public class JU_ServiceImpl_createUserCred extends JU_BaseServiceImpl { when(orgIdentity.isFound()).thenReturn(true); String ns = "org.onap.sample"; when(question.nsDAO().read(trans, ns)).thenReturn(Result.ok(nsData(ns))); - + CredDAO.Data cdd = credDataFound(cr,100); when(question.credDAO().create(any(AuthzTrans.class), any(CredDAO.Data.class) )).thenReturn(Result.ok(cdd)); when(question.credDAO().readID(trans, cr.getId())).thenReturn(Result.ok(listOf(cdd))); @@ -126,7 +126,7 @@ public class JU_ServiceImpl_createUserCred extends JU_BaseServiceImpl { cr.setType(CredDAO.RAW); return cr; } - + private CredDAO.Data credDataFound(CredRequest cr, int days) { CredDAO.Data cdd = new CredDAO.Data(); cdd.id = cr.getId(); @@ -144,5 +144,5 @@ public class JU_ServiceImpl_createUserCred extends JU_BaseServiceImpl { cdd.expires = gc.getTime(); return cdd; } - + } \ No newline at end of file