From 39596f5b6d2c67d8c2b357243ecfb2dd6d746796 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 7 Feb 2019 18:53:11 -0600 Subject: Minor fixes starting from Scratch Issue-ID: AAF-698 Change-Id: Ie279c11f9f385e9cb179cbe3e16de35cbfa33ecf Signed-off-by: Instrumental --- .../aaf/auth/org/test/JU_OrganizationFactory.java | 9 ++--- .../aaf/auth/server/test/JU_AbsServiceStarter.java | 38 ++++------------------ 2 files changed, 8 insertions(+), 39 deletions(-) (limited to 'auth/auth-core/src/test/java/org/onap') diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java index 36d071fd..20b47331 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java @@ -55,13 +55,8 @@ public class JU_OrganizationFactory { @SuppressWarnings("static-access") @Test - public void testInit() { - try { - organizationFactory.init(bEnv); - Assert.fail("Expect an exception"); - } catch (OrganizationException e) { - Assert.assertEquals("At least one Organization must be defined", e.getMessage()); - } + public void testInit() throws OrganizationException { + Assert.assertEquals(null, organizationFactory.init(bEnv)); } @SuppressWarnings("static-access") //TODO:Fix this once real input is available AAF-111 diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java index 04d58d6b..9b49216d 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java @@ -21,51 +21,25 @@ package org.onap.aaf.auth.server.test; -import static org.junit.Assert.*; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +import javax.servlet.Filter; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.onap.aaf.auth.env.AuthzTrans; -import org.onap.aaf.auth.env.AuthzTransFilter; -import org.onap.aaf.auth.local.AbsData; -import org.onap.aaf.auth.local.DataFile; -import org.onap.aaf.auth.local.TextIndex; import org.onap.aaf.auth.rserv.RServlet; import org.onap.aaf.auth.server.AbsService; import org.onap.aaf.auth.server.AbsServiceStarter; -import org.onap.aaf.auth.server.test.JU_AbsService; import org.onap.aaf.cadi.Access; +import org.onap.aaf.cadi.Access.Level; import org.onap.aaf.cadi.CadiException; import org.onap.aaf.cadi.LocatorException; import org.onap.aaf.cadi.PropAccess; -import org.onap.aaf.cadi.Access.Level; import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.register.Registrant; import org.onap.aaf.misc.env.impl.BasicEnv; -import org.onap.aaf.auth.local.AbsData.Iter; -import org.onap.aaf.auth.local.AbsData.Reuse; - -import junit.framework.Assert; - -import static org.junit.Assert.*; -import static org.mockito.Matchers.*; -import static org.mockito.Mockito.*; - -import java.io.BufferedWriter; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.io.PrintStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.security.Principal; - -import javax.servlet.Filter; public class JU_AbsServiceStarter { @@ -76,7 +50,7 @@ public class JU_AbsServiceStarter { private class AbsServiceStarterStub extends AbsServiceStarter { public AbsServiceStarterStub(AbsService service) { - super(service, true); + super(service); // TODO Auto-generated constructor stub } -- cgit 1.2.3-korg