Replaced all tabs with spaces in java and pom.xml
[so.git] / mso-catalog-db / src / test / java / org / onap / so / db / catalog / beans / BeansTest.java
index 2188380..f710890 100644 (file)
@@ -24,11 +24,9 @@ import static org.hamcrest.CoreMatchers.allOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.onap.so.openpojo.rules.HasAnnotationMatcher.hasAnnotation;
 import static org.onap.so.openpojo.rules.HasAnnotationPropertyWithValueMatcher.hasAnnotationPropertyWithValue;
-
 import javax.persistence.Column;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Temporal;
-
 import org.junit.Ignore;
 import org.junit.Test;
 import org.onap.so.openpojo.rules.CustomSetterMustExistRule;
@@ -36,7 +34,6 @@ 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;
@@ -57,45 +54,40 @@ import com.openpojo.validation.test.impl.SetterTester;
 
 public class BeansTest {
 
-       private PojoClassFilter filterTestClasses = new FilterTestClasses();
-       
-       private PojoClassFilter  enumFilter = new FilterEnum();
-       
-       
+    private PojoClassFilter filterTestClasses = new FilterTestClasses();
+
+    private PojoClassFilter enumFilter = new FilterEnum();
+
+
+
+    @Test
+    public void pojoStructure() {
+        test("org.onap.so.db.catalog.beans");
+        test("org.onap.so.db.catalog.beans.macro");
+    }
+
+    private void test(String pojoPackage) {
+        Validator validator = ValidatorBuilder.create().with(new GetterMustExistRule()).with(new NoPrimitivesRule())
+                .with(new NoNestedClassRule()).with(new NoStaticExceptFinalRule())
+                .with(new SerializableMustHaveSerialVersionUIDRule()).with(new HasToStringRule())
+                .with(new EqualsAndHashCodeTester()).with(new NoPublicFieldsExceptStaticFinalRule())
+                .with(new CustomSetterMustExistRule()
+                        .exclude(allOf(hasAnnotationPropertyWithValue(Column.class, "updatable", equalTo(false)),
+                                hasAnnotation(GeneratedValue.class)), hasAnnotation(Temporal.class)))
+
+                .with(new SetterTester()).with(new GetterTester()).with(new ToStringTester())
+                .with(new HasEqualsAndHashCodeRule())
+
+                .build();
+
 
-       @Test
-       public void pojoStructure() {   
-               test("org.onap.so.db.catalog.beans");           
-               test("org.onap.so.db.catalog.beans.macro");             
-       }
+        validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses, enumFilter,
+                new FilterNonConcrete());
+    }
 
-       private void test(String pojoPackage) {
-               Validator validator = ValidatorBuilder.create()
-                               .with(new GetterMustExistRule())
-                               .with(new NoPrimitivesRule())
-                           .with(new NoNestedClassRule())
-                           .with(new NoStaticExceptFinalRule())
-                           .with(new SerializableMustHaveSerialVersionUIDRule())
-                               .with(new HasToStringRule())
-                               .with(new EqualsAndHashCodeTester())
-                           .with(new NoPublicFieldsExceptStaticFinalRule())
-                               .with(new CustomSetterMustExistRule().exclude(
-                                               allOf(hasAnnotationPropertyWithValue(Column.class, "updatable", equalTo(false)), hasAnnotation(GeneratedValue.class)),
-                                               hasAnnotation(Temporal.class)))
-                               
-                               .with(new SetterTester())
-                               .with(new GetterTester())
-                               .with(new ToStringTester())
-                               .with(new HasEqualsAndHashCodeRule())
-                            
-                               .build();
-               
-       
-               validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses,enumFilter,new FilterNonConcrete());
-       }
-       private static class FilterTestClasses implements PojoClassFilter {
-               public boolean include(PojoClass pojoClass) {
-                       return !pojoClass.getSourcePath().contains("/test-classes/");
-               }
-       }
+    private static class FilterTestClasses implements PojoClassFilter {
+        public boolean include(PojoClass pojoClass) {
+            return !pojoClass.getSourcePath().contains("/test-classes/");
+        }
+    }
 }