diff --git a/04-tests.bs b/04-tests.bs index 11a6238..09d5d50 100644 --- a/04-tests.bs +++ b/04-tests.bs @@ -15,47 +15,114 @@ Abstract: # Tests # {#overview} -## 01. Initialization ## {#01} +## 1. Initialization ## {#1} + +Purpose: Ensuring that it is unambiguous yet user friendly way of knowing the identifier of the collection, as well as the current page of the collection’s view. This test is about a function `initialization(url)`. The function will return a the collection and the URL of the root node. We’ll test this with various URLs containing different contents. -### 01.1 The URL to a rootnode without redirects ### {#01.1} +### 1.1 The URL to a rootnode without redirects ### {#1.1} -File url `test01.1.ttl` +File url `test1.1.ttl` ```turtle @prefix tree: . - tree:view . + tree:view . ``` Returns: * Collection: `` - * Root node: `` + * Root node: `` -### 01.2 The URL to a collection without redirects ### {#01.2} +### 1.2 The URL to a collection without redirects ### {#1.2} -File url `test01.2.ttl#collection` +File url `test1.2.ttl#collection` ```turtle @prefix tree: . - tree:view . + tree:view . ``` Returns: - * Collection: `` - * Root node: `` + * Collection: `` + * Root node: `` -### 01.3 The URL to a rootnode before redirects ### {#01.3} +### 1.3 The URL to a rootnode before redirects ### {#1.3} -File url `test01.3` should redirect to `test01.3.ttl` +File url `test1.3` should redirect to `test1.3.ttl` ```turtle @prefix tree: . - tree:view . + tree:view . ``` Returns: * Collection: `` - * Root node: `` + * Root node: `` + +TODO: Search forms + +## 2. Members ## {#2} + +Goal: Once we have the container URL, we must ensure we know what the members of the collection mentioned in this page are. + +### 2.1 Finding member IRIs ### {#2.1} + +File url `` + +Operation: Finding the set of members in ``. + +```turtle +@prefix tree: . + tree:view ; + tree:member , , _:b0 . +``` + +Returns: + * 2 member identifiers ``, `` and a blank node member. + +### 2.2 Empty page ### {#2.2} + +File url `` + +Operation: Finding the set of members in ``. + +```turtle +@prefix tree: . + tree:view . +``` + +Returns: an empty set. + +## 3. Extracting members ## {#3} + +Goal: Checking whether your implementation will extract the right set of quads + + +### 3.1 Star pattern ### {#3.1} + +File url `` + +Operation: Finding all quads that belong to ``. + +```turtle +@prefix tree: . +@prefix ex: . + tree:view ; + tree:member . + ex:p ex:o . +``` + +Returns: an array with 1 quad ` ex:p ex:o`. + +TODO: take more tests from the extract cbd shape repository + +## 4. Pruning relations ## {#4} + +TODO: These test cases will get more complex + +## 5. Using search forms ## {#5} + +TODO: Search forms \ No newline at end of file