How to Write Unit Tests
1) Inside a test, at the beginning, add the following (change the paths to the test data as needed):
val rdfDataObjects = List ( RdfDataObject(path = "test_data/responders.v1.ValuesResponderV1Spec/incunabula-data.ttl", name = "http://www.knora.org/data/incunabula") )
The data will be automatically loaded before any tests are executed. These tests should be stored inside
src/test folder hierarchy.
2) Call the test from terminal:
$ make test-unit $ make test-e2e
How to Write Integration Tests
The only difference between Integration and Unit tests is the location where they are stored and the way how they are called:
1) Store tests inside the
src/it folder hierarchy.
2) Call the tests from the terminal:
Last update: 2022-06-22