-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9fbe7a
commit a9a1ad1
Showing
8 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.trivago.rta.json.pojo; | ||
|
||
import com.openpojo.reflection.PojoClass; | ||
import com.openpojo.reflection.filters.FilterPackageInfo; | ||
import com.openpojo.reflection.impl.PojoClassFactory; | ||
import com.openpojo.validation.Validator; | ||
import com.openpojo.validation.ValidatorBuilder; | ||
import com.openpojo.validation.affirm.Affirm; | ||
import com.openpojo.validation.test.impl.GetterTester; | ||
import com.openpojo.validation.test.impl.SetterTester; | ||
import org.junit.Test; | ||
|
||
import java.util.List; | ||
|
||
public class PojoTest { | ||
private static final int EXPECTED_CLASS_COUNT = 12; | ||
private static final String POJO_PACKAGE = "com.trivago.rta.json.pojo"; | ||
|
||
@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 SetterTester()) | ||
.with(new GetterTester()) | ||
.build(); | ||
|
||
validator.validate(POJO_PACKAGE, new FilterPackageInfo()); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/test/java/com/trivago/rta/rendering/pages/pojos/PojoTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.trivago.rta.rendering.pages.pojos; | ||
|
||
import com.openpojo.reflection.PojoClass; | ||
import com.openpojo.reflection.filters.FilterPackageInfo; | ||
import com.openpojo.reflection.impl.PojoClassFactory; | ||
import com.openpojo.validation.Validator; | ||
import com.openpojo.validation.ValidatorBuilder; | ||
import com.openpojo.validation.affirm.Affirm; | ||
import com.openpojo.validation.test.impl.GetterTester; | ||
import com.openpojo.validation.test.impl.SetterTester; | ||
import org.junit.Test; | ||
|
||
import java.util.List; | ||
|
||
public class PojoTest { | ||
private static final int EXPECTED_CLASS_COUNT = 6; | ||
private static final String POJO_PACKAGE = "com.trivago.rta.rendering.pages.pojos"; | ||
|
||
@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 SetterTester()) | ||
.with(new GetterTester()) | ||
.build(); | ||
|
||
validator.validate(POJO_PACKAGE, new FilterPackageInfo()); | ||
} | ||
} |
4 changes: 0 additions & 4 deletions
4
src/test/java/com/trivago/rta/rendering/pages/pojos/StartPageCollectionTest.java
This file was deleted.
Oops, something went wrong.