@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Documented public @interface Verify
Annotate test method with @Verify to verify database after the test method executed. Annotate the whole test class to have all its test methods verify database. For example:
@Test @Verify public void myTestMethod { }
By default, system locates sequentially the following files in the package of the class, the first file found wins:
Specify the names of files explicitly in the annotation to override the default file name convention. Multiple files may be specified, 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.
Await
,
Verify.List
public abstract String[] value
public abstract String profile
A profile lets you connect to a different database. A profile must be defined in LightAir properties file and must have its own properties file which defines the connection to the profile database.
Copyright © 2011–2020 Lastware, sro.. All rights reserved.