Skip to content

Commit

Permalink
Added Pojo-Tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzl committed Apr 11, 2016
1 parent bcd655c commit e71d08a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
<version>${version.mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.openpojo</groupId>
<artifactId>openpojo</artifactId>
<version>0.8.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package de.multimedia.emulation.emil.integration.rosetta;

import com.openpojo.reflection.PojoClass;
import com.openpojo.reflection.filters.FilterPackageInfo;
import static com.openpojo.reflection.impl.PojoClassFactory.getPojoClasses;
import com.openpojo.validation.Validator;
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;

/**
*
* @author Marcus Bitzl <[email protected]>
*/
public class PojoTest {

@Test
public void testGetterAndSetter() {
Validator validator = ValidatorBuilder.create()
.with(new SetterTester())
.with(new GetterTester())
.build();
FilterPackageInfo filterPackageInfo = new FilterPackageInfo();

List<PojoClass> pojoClasses = new ArrayList<>();
pojoClasses.addAll(getPojoClasses("de.multimedia.emulation.emil.integration.rosetta.model", filterPackageInfo));
// pojoClasses.addAll(getPojoClassesRecursively("", filterPackageInfo));
validator.validate(pojoClasses);
}

}

0 comments on commit e71d08a

Please sign in to comment.