X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2Ftest%2FJU_AbsService.java;h=c80c81872126701defac7644b24e235d9c1f8f9c;hb=6dd9704640eb8cc8d6b4ccd266e40a3f6f589e75;hp=cd73e8627d7575037eff5270b044b78cad955cbe;hpb=732344f175150fed87e0140ad75152d325364c8b;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsService.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsService.java index cd73e862..c80c8187 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsService.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsService.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.server.test; import static org.junit.Assert.*; @@ -62,51 +63,52 @@ import java.security.Principal; import javax.servlet.Filter; public class JU_AbsService { - - ByteArrayOutputStream outStream; - - private class AbsServiceStub extends AbsService { - - public AbsServiceStub(Access access, BasicEnv env) throws CadiException { - super(access, env); - // TODO Auto-generated constructor stub - } - - @Override - public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException { - // TODO Auto-generated method stub - return null; - } - - @Override - public Registrant[] registrants(int port) throws CadiException, LocatorException { - // TODO Auto-generated method stub - return null; - } - - } - - @Before - public void setUp() { - outStream = new ByteArrayOutputStream(); - System.setOut(new PrintStream(outStream)); - } - - @After - public void tearDown() { - System.setOut(System.out); - } - - @Test - public void testStub() throws CadiException { - BasicEnv bEnv = new BasicEnv(); - PropAccess prop = new PropAccess(); - - prop.setProperty(Config.AAF_COMPONENT, "te.st:te.st"); - prop.setLogLevel(Level.DEBUG); - AbsServiceStub absServiceStub = new AbsServiceStub(prop, bEnv); //Testing other branches requires "fails" due to exception handling, will leave that off for now. - } - + + ByteArrayOutputStream outStream; + + private class AbsServiceStub extends AbsService { + + public AbsServiceStub(Access access, BasicEnv env) throws CadiException { + super(access, env); + // TODO Auto-generated constructor stub + } + + @Override + public Filter[] _filters(Object ... additionalTafLurs) throws CadiException, LocatorException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Registrant[] registrants(int port) throws CadiException, LocatorException { + // TODO Auto-generated method stub + return null; + } + + } + + @Before + public void setUp() { + outStream = new ByteArrayOutputStream(); + System.setOut(new PrintStream(outStream)); + } + + @After + public void tearDown() { + System.setOut(System.out); + } + + @Test + public void testStub() throws CadiException { + BasicEnv bEnv = new BasicEnv(); + PropAccess prop = new PropAccess(); + + prop.setProperty(Config.AAF_LOCATOR_ENTRIES, "te.st"); + prop.setProperty(Config.AAF_LOCATOR_VERSION, "te.st"); + prop.setLogLevel(Level.DEBUG); + AbsServiceStub absServiceStub = new AbsServiceStub(prop, bEnv); //Testing other branches requires "fails" due to exception handling, will leave that off for now. + } + }