Programmatic API

Light Air provides programmatic API with the net.sf.lightair.Api class.

The general contract is to initialize and shutdown and in between perform either generateXsd call or (a series of) setup and verify calls.

To generate XSD files:

Api.initialize(Api.getPropertiesFileName());
Api.generateXsd();
Api.shutdown();

To setup and verify database:

Map<String, List<String>> fileNames = new HashMap<>();
fileNames.put(Keywords.DEFAULT_PROFILE, Arrays.asList("my-dataset-1.xml", "my-dataset-2.xml"));

Api.initialize(Api.getPropertiesFileName());
Api.setup(fileNames);
// ...execute function under test...
Api.verify(fileNames);
// ...possibly repeat setup and verify for other tests...
Api.shutdown();
Next: Development >>