X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-oauth%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Foauth%2Fmapper%2FJU_MapperIntrospect1_0Test.java;h=d67ad9b22673681bfc4b2f25d502a35473aaac9e;hb=1296352d8eafee57f982a4342ad79ada4aa56d28;hp=d303755fbf6f698d32f7743071189885d161b077;hpb=e821cada5c4d0ba1ff0cc533198c04c62cca6fe7;p=aaf%2Fauthz.git diff --git a/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/mapper/JU_MapperIntrospect1_0Test.java b/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/mapper/JU_MapperIntrospect1_0Test.java index d303755f..d67ad9b2 100644 --- a/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/mapper/JU_MapperIntrospect1_0Test.java +++ b/auth/auth-oauth/src/test/java/org/onap/aaf/auth/oauth/mapper/JU_MapperIntrospect1_0Test.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. @@ -18,6 +18,7 @@ * ============LICENSE_END==================================================== * */ + package org.onap.aaf.auth.oauth.mapper; import static org.junit.Assert.assertEquals; @@ -37,58 +38,58 @@ import org.onap.aaf.auth.layer.Result; import aafoauth.v2_0.Introspect; public class JU_MapperIntrospect1_0Test { - @Mock - private HttpServletRequest req; + @Mock + private HttpServletRequest req; - Data data; + Data data; - @Before - public void setup() { - initMocks(this); - data = new Data(); - } + @Before + public void setup() { + initMocks(this); + data = new Data(); + } - @Test - public void testIntrospect() { - data.type = 1; + @Test + public void testIntrospect() { + data.type = 1; - Result dataResult = Result.create(data, 0, "detail", "var"); + Result dataResult = Result.create(data, 0, "detail", "var"); - MapperIntrospect mapper = new MapperIntrospect1_0(); + MapperIntrospect mapper = new MapperIntrospect1_0(); - Result intro = mapper.introspect(dataResult); + Result intro = mapper.introspect(dataResult); - assertEquals(intro.value.getClientType(), "confidential"); - } + assertEquals(intro.value.getClientType(), "confidential"); + } - @Test - public void testIntrospectWithUnknowType() { - data.type = 5; - data.scopes = new HashSet(); + @Test + public void testIntrospectWithUnknowType() { + data.type = 5; + data.scopes = new HashSet(); - data.scopes.add(Scope.APPLICATION.toString()); - data.scopes.add(Scope.HANDLER.toString()); + data.scopes.add(Scope.APPLICATION.toString()); + data.scopes.add(Scope.HANDLER.toString()); - Result dataResult = Result.create(data, 0, "detail", "var"); + Result dataResult = Result.create(data, 0, "detail", "var"); - MapperIntrospect mapper = new MapperIntrospect1_0(); + MapperIntrospect mapper = new MapperIntrospect1_0(); - Result intro = mapper.introspect(dataResult); + Result intro = mapper.introspect(dataResult); - assertEquals(intro.value.getClientType(), "unknown"); - } + assertEquals(intro.value.getClientType(), "unknown"); + } - @Test - public void testIntrospectWithNotOk() { - data.type = 5; + @Test + public void testIntrospectWithNotOk() { + data.type = 5; - Result dataResult = Result.create(data, 1, "detail", "var"); + Result dataResult = Result.create(data, 1, "detail", "var"); - MapperIntrospect mapper = new MapperIntrospect1_0(); + MapperIntrospect mapper = new MapperIntrospect1_0(); - Result intro = mapper.introspect(dataResult); + Result intro = mapper.introspect(dataResult); - assertEquals(intro.value, null); - } + assertEquals(intro.value, null); + } -} \ No newline at end of file +}