diff options
author | Instrumental <jonathan.gathman@att.com> | 2019-02-07 11:09:32 -0600 |
---|---|---|
committer | Instrumental <jonathan.gathman@att.com> | 2019-02-07 11:12:23 -0600 |
commit | e2fa0e67712b92c69f6863afe10c1c973a068e3e (patch) | |
tree | 57a477bc5edd1e228c4c3197c5b90542a92edf9d /auth/auth-core/src/test | |
parent | e43bc462af00e9c05384313514b279e11372fd79 (diff) |
Add Batch in Config image
Change Images to run as aaf
Issue-ID: AAF-740
Change-Id: If5b8583dc19ac4095ba9b25715e9330d2a0ed5fc
Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-core/src/test')
-rw-r--r-- | auth/auth-core/src/test/java/org/onap/aaf/auth/org/test/JU_OrganizationFactory.java | 15 | ||||
-rw-r--r-- | auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java | 2 |
2 files changed, 12 insertions, 5 deletions
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 } |