Annotation Interface Verify
Annotate a test method with @Verify to verify the database after the test method executed. Annotate the whole test class to have all its test methods verify the database. For example:
@Test @Verify
public void myTestMethod {
}
By default, the system locates sequentially the following files in the package of the class, the first file found wins:
- <test class name>.<test method name>-verify.xml
- <test method name>-verify.xml
- <test class name>-verify.xml
Specify the names of files explicitly in the annotation to override the default file name convention. Multiple files may be specified, the system uses all of them. The files are located in the package of the class. For example:
@Test
@Verify({ "custom-verify-1.xml", "custom-verify-2.xml", "custom-verify-3.xml" })
public void myTestMethod {
}
The verification files must conform to the DBunit's "flat XML dataset" format, which means there is a root <dataset /> element, which contains one element for each row, where the name of the row element specifies the database table and its elements specify the table columns. So, for example:
<dataset>
<person name="Joe" />
</dataset>
System verifies all datasets located against the database.
Use @Verify.List to define multiple @Verify annotations
on the same element.
See http://lightair.sourceforge.net/features/verify.html for more info.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines several @Verifyannotations on the same element. -
Optional Element Summary
Optional Elements
-
Element Details
-
value
-
profile
String profileName of the profile.A profile lets you connect to a different database. A profile must be defined in the LightAir properties file and must have its own properties file which defines the connection to the profile database.
- Returns:
- profile
- Default:
""
-