summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-requests-db/src/test/java/org')
-rw-r--r--mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/beans/BeansTest.java48
1 files changed, 20 insertions, 28 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/beans/BeansTest.java b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/beans/BeansTest.java
index 3f9443ff4a..4211a5ed47 100644
--- a/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/beans/BeansTest.java
+++ b/mso-api-handlers/mso-requests-db/src/test/java/org/onap/so/db/request/beans/BeansTest.java
@@ -21,16 +21,13 @@
package org.onap.so.db.request.beans;
import static org.onap.so.openpojo.rules.HasAnnotationMatcher.hasAnnotation;
-
import javax.persistence.Temporal;
-
import org.junit.Test;
import org.onap.so.openpojo.rules.CustomSetterMustExistRule;
import org.onap.so.openpojo.rules.EqualsAndHashCodeTester;
import org.onap.so.openpojo.rules.HasEqualsAndHashCodeRule;
import org.onap.so.openpojo.rules.HasToStringRule;
import org.onap.so.openpojo.rules.ToStringTester;
-
import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.PojoClassFilter;
import com.openpojo.reflection.filters.FilterEnum;
@@ -43,29 +40,24 @@ import com.openpojo.validation.test.impl.SetterTester;
public class BeansTest {
- private PojoClassFilter filterTestClasses = new FilterTestClasses();
-
- @Test
- public void pojoStructure() {
- test("org.onap.so.db.request.beans");
- }
-
- private void test(String pojoPackage) {
- Validator validator = ValidatorBuilder.create()
- .with(new GetterMustExistRule())
- .with(new CustomSetterMustExistRule().exclude(hasAnnotation(Temporal.class)))
- .with(new HasEqualsAndHashCodeRule())
- .with(new HasToStringRule())
- .with(new SetterTester())
- .with(new GetterTester())
- .with(new EqualsAndHashCodeTester())
- .with(new ToStringTester())
- .build();
- validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, new FilterEnum());
- }
- private static class FilterTestClasses implements PojoClassFilter {
- public boolean include(PojoClass pojoClass) {
- return !pojoClass.getSourcePath().contains("/test-classes/");
- }
- }
+ private PojoClassFilter filterTestClasses = new FilterTestClasses();
+
+ @Test
+ public void pojoStructure() {
+ test("org.onap.so.db.request.beans");
+ }
+
+ private void test(String pojoPackage) {
+ Validator validator = ValidatorBuilder.create().with(new GetterMustExistRule())
+ .with(new CustomSetterMustExistRule().exclude(hasAnnotation(Temporal.class)))
+ .with(new HasEqualsAndHashCodeRule()).with(new HasToStringRule()).with(new SetterTester())
+ .with(new GetterTester()).with(new EqualsAndHashCodeTester()).with(new ToStringTester()).build();
+ validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, new FilterEnum());
+ }
+
+ private static class FilterTestClasses implements PojoClassFilter {
+ public boolean include(PojoClass pojoClass) {
+ return !pojoClass.getSourcePath().contains("/test-classes/");
+ }
+ }
}