WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Assert Libraries

If a module provides resources and services supporting a new information resource model, that module may also provide a library of assert definitions tailored to that model. This will allow modules that use the resource model to have their own test module that can assert various facts about those resources that may be used.

For example, if a module provides the application domain information resource model Customer, then that module could also provide assertions such as customerValid and customerActive.

2009-02-16 14:49ZCanvas 1Layer 1Test SpaceSpace Under TestImportXUnitResourceModelImportImport Assert LibraryImport Resource Model

To provide an assert library, the resource model module will export the resource res:/{module-path}/assert/assertLibrary.xml. For example, if the resource module ID is urn:com:mycomp:resourcemodel:customer that module would provide the resource res:/com/mycomp/resourcemodel/customer/assert/assertLibrary.xml. In addition, any resources or services that the individual assert program utilize must also be made available in the public space.

To use an assert library an import statement is used within a testlist:

  <import>res:/com/mycomp/resourcemodel/customer/assert/assertLibrary.xml</import> ...
  <test> ...
      <customerValid />
  </test> ...

and the resource model must be imported into the test space by adding the following to that module's module.xml file: