aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java82
1 files changed, 37 insertions, 45 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
index 8236e6766f..fdc84966e6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
@@ -22,12 +22,9 @@ package org.onap.so.apihandlerinfra.tenantisolationbeans;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-
import java.util.List;
-
import org.junit.Test;
import org.onap.so.apihandlerinfra.BaseTest;
-
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.filters.FilterPackageInfo;
import com.openpojo.reflection.impl.PojoClassFactory;
@@ -39,49 +36,44 @@ import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-public class TenantIsolationBeansTest extends BaseTest{
-
- private static final int EXPECTED_CLASS_COUNT = 25;
- private static final String POJO_PACKAGE = "org.onap.so.apihandlerinfra.tenantisolationbeans";
+public class TenantIsolationBeansTest extends BaseTest {
+
+ private static final int EXPECTED_CLASS_COUNT = 25;
+ private static final String POJO_PACKAGE = "org.onap.so.apihandlerinfra.tenantisolationbeans";
+
+ @Test
+ public void ensureExpectedPojoCount() {
+ List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses(POJO_PACKAGE, new FilterPackageInfo());
+ Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
+ }
+
+ @Test
+ public void testPojoStructureAndBehavior() {
+ Validator validator = ValidatorBuilder.create().with(new GetterMustExistRule()).with(new SetterMustExistRule())
+ .with(new SetterTester()).with(new GetterTester()).build();
+
+ validator.validate(POJO_PACKAGE, new FilterPackageInfo());
+ }
+
+ @Test
+ public void testTenantIsolationToString() {
+ TenantIsolationRequest request = new TenantIsolationRequest();
+ request.setRequestId("requestId");
+ request.setRequestScope("scope");
+ request.setRequestType("type");
+ request.setStartTime("time");
+ request.setRequestDetails(new RequestDetails());
+ request.setRequestStatus(new RequestStatus());
- @Test
- public void ensureExpectedPojoCount() {
- List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses( POJO_PACKAGE,
- new FilterPackageInfo());
- Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
- }
+ assertNotNull(request.toString());
+ }
- @Test
- public void testPojoStructureAndBehavior() {
- Validator validator = ValidatorBuilder.create()
- .with(new GetterMustExistRule())
- .with(new SetterMustExistRule())
- .with(new SetterTester())
- .with(new GetterTester())
- .build();
+ @Test
+ public void testRequestListToString() {
+ RequestList list = new RequestList();
+ list.setRequest(new Request());
+ list.setRequestStatus(new RequestStatus());
- validator.validate(POJO_PACKAGE, new FilterPackageInfo());
- }
-
- @Test
- public void testTenantIsolationToString() {
- TenantIsolationRequest request = new TenantIsolationRequest();
- request.setRequestId("requestId");
- request.setRequestScope("scope");
- request.setRequestType("type");
- request.setStartTime("time");
- request.setRequestDetails(new RequestDetails());
- request.setRequestStatus(new RequestStatus());
-
- assertNotNull(request.toString());
- }
-
- @Test
- public void testRequestListToString() {
- RequestList list = new RequestList();
- list.setRequest(new Request());
- list.setRequestStatus(new RequestStatus());
-
- assertNotNull(list.toString());
- }
+ assertNotNull(list.toString());
+ }
}