X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-oauth%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Foauth%2Ffacade%2FJU_OAFacadeFactory.java;h=3c7b297006d41ae4a0182f92130d6090fea23209;hb=4b5a7d721d994a49057e9bfb403c7bff1b376660;hp=bf9cbdd6c4b662ccdb5d3504c812ec30e65e78f5;hpb=824dc7b5fc0e1ccdf7f460479aff344727f0f01e;p=aaf%2Fauthz.git diff --git a/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/facade/JU_OAFacadeFactory.java b/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/facade/JU_OAFacadeFactory.java index bf9cbdd6..3c7b2970 100644 --- a/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/facade/JU_OAFacadeFactory.java +++ b/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/facade/JU_OAFacadeFactory.java @@ -37,51 +37,51 @@ import aafoauth.v2_0.Introspect; public class JU_OAFacadeFactory { - @Mock - private OAuthService service; + @Mock + private OAuthService service; - private String token; + private String token; - private AuthzTrans trans; - @Mock - private Result rs; + private AuthzTrans trans; + @Mock + private Result rs; - @Before - public void setUp() throws Exception { - initMocks(this); - } + @Before + public void setUp() throws Exception { + initMocks(this); + } - @Test - public void testStatusNotOk() throws APIException { - when(service.introspect(trans, token)).thenReturn(rs); - when(rs.notOK()).thenReturn(true); + @Test + public void testStatusNotOk() throws APIException { + when(service.introspect(trans, token)).thenReturn(rs); + when(rs.notOK()).thenReturn(true); - DirectIntrospect direct = OAFacadeFactory.directV1_0(service); - Result rti = direct.mappedIntrospect(trans, token); + DirectIntrospect direct = OAFacadeFactory.directV1_0(service); + Result rti = direct.mappedIntrospect(trans, token); - assertEquals(rti.status, 0); - } + assertEquals(rti.status, 0); + } - @Test - public void testStatusOk() throws APIException { - when(service.introspect(trans, token)).thenReturn(rs); - when(rs.notOK()).thenReturn(false); + @Test + public void testStatusOk() throws APIException { + when(service.introspect(trans, token)).thenReturn(rs); + when(rs.notOK()).thenReturn(false); - DirectIntrospect directV1_0 = OAFacadeFactory.directV1_0(service); - Result rti = directV1_0.mappedIntrospect(trans, token); + DirectIntrospect directV1_0 = OAFacadeFactory.directV1_0(service); + Result rti = directV1_0.mappedIntrospect(trans, token); - assertEquals(rti.status, 0); - } + assertEquals(rti.status, 0); + } - @Test - public void testStatusOkWithResultSetEmpty() throws APIException { - when(service.introspect(trans, token)).thenReturn(rs); - when(rs.isEmpty()).thenReturn(true); - when(rs.notOK()).thenReturn(false); + @Test + public void testStatusOkWithResultSetEmpty() throws APIException { + when(service.introspect(trans, token)).thenReturn(rs); + when(rs.isEmpty()).thenReturn(true); + when(rs.notOK()).thenReturn(false); - DirectIntrospect directV1_0 = OAFacadeFactory.directV1_0(service); - Result rti = directV1_0.mappedIntrospect(trans, token); + DirectIntrospect directV1_0 = OAFacadeFactory.directV1_0(service); + Result rti = directV1_0.mappedIntrospect(trans, token); - assertEquals(rti.status, Result.ERR_NotFound); - } + assertEquals(rti.status, Result.ERR_NotFound); + } }