From e2fa0e67712b92c69f6863afe10c1c973a068e3e Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 7 Feb 2019 11:09:32 -0600 Subject: Add Batch in Config image Change Images to run as aaf Issue-ID: AAF-740 Change-Id: If5b8583dc19ac4095ba9b25715e9330d2a0ed5fc Signed-off-by: Instrumental --- .../onap/aaf/auth/org/test/JU_OrganizationFactory.java | 15 +++++++++++---- .../onap/aaf/auth/server/test/JU_AbsServiceStarter.java | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'auth/auth-core/src/test') 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 5124a506..36d071fd 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 @@ -22,20 +22,22 @@ package org.onap.aaf.auth.org.test; +import static org.mockito.Mockito.mock; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import static org.mockito.Mockito.mock; import org.onap.aaf.auth.env.AuthzEnv; import org.onap.aaf.auth.env.AuthzTrans; import org.onap.aaf.auth.org.OrganizationException; import org.onap.aaf.auth.org.OrganizationFactory; -import org.onap.aaf.misc.env.APIException; import org.onap.aaf.misc.env.impl.BasicEnv; import org.powermock.api.mockito.PowerMockito; import org.powermock.modules.junit4.PowerMockRunner; +import junit.framework.Assert; + @RunWith(PowerMockRunner.class) public class JU_OrganizationFactory { private static final String ORG_SLOT = null; @@ -53,8 +55,13 @@ public class JU_OrganizationFactory { @SuppressWarnings("static-access") @Test - public void testInit() throws OrganizationException { - organizationFactory.init(bEnv); + 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()); + } } @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 2fa9e123..04d58d6b 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 @@ -76,7 +76,7 @@ public class JU_AbsServiceStarter { private class AbsServiceStarterStub extends AbsServiceStarter { public AbsServiceStarterStub(AbsService service) { - super(service); + super(service, true); // TODO Auto-generated constructor stub } -- cgit 1.2.3-korg