public class ModelTest extends Object
These tests are called by JUnit tests but also by the Repository. They are fast and its better to see problems at startup of an application.
Constructor and Description |
---|
ModelTest(Class<?>... modelClasses) |
ModelTest(Collection<Class<?>> mainClasses) |
ModelTest(Model model) |
Modifier and Type | Method and Description |
---|---|
void |
assertValid()
if there are problems log them and throw IllegalArgumentException
|
static void |
exitIfProblems()
Allows fail early when application is started.
|
Set<Class<?>> |
getModelClasses() |
List<String> |
getProblems() |
boolean |
isValid() |
void |
logProblems() |
public ModelTest(Model model)
public ModelTest(Class<?>... modelClasses)
public ModelTest(Collection<Class<?>> mainClasses)
public static void exitIfProblems()
public void assertValid()
IllegalArgumentException
- if problems is not emptypublic void logProblems()
public boolean isValid()
Copyright © 2019. All rights reserved.