Skip to content

Latest commit

 

History

History

validation-junit4

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

validation-junit4

Junit4 validation components

javadoc

Usage

After importing the bom:

<dependency>
  <!-- model validation -->
  <groupId>com.mastercard.test.flow</groupId>
  <artifactId>validation-junit4</artifactId>
</dependency>

The Validator implementation provided by this module can used in a parameterised test:

@RunWith(Parameterized.class)
public class MyTest {
	@Parameters(name = "{0}")
	public static Collection<Object[]> flows() {
		return new Validator()
				.checking( MY_SYSTEM_MODEL )
				.with( AbstractValidator.defaultChecks() )
				.parameters();
	}

	@Parameter(0)
	public String name;

	@Parameter(1)
	public Runnable check;

	@Test
	public void test() {
		check.run();
	}
}