summaryrefslogtreecommitdiffstats
path: root/auth/auth-core/src/test
diff options
context:
space:
mode:
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.java15
-rw-r--r--auth/auth-core/src/test/java/org/onap/aaf/auth/server/test/JU_AbsServiceStarter.java2
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
}