--- a/tests/ldp-testsuite.html Wed Jun 18 17:10:58 2014 -0400
+++ b/tests/ldp-testsuite.html Sun Jun 22 22:19:42 2014 -0400
@@ -1,3 +1,3 @@
-<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
prefix="td: http://www.w3.org/2006/03/test-description# tn: http://ldp.example.org/NewTestDefinitions# ht: http://www.w3.org/2011/http#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- rgarcia: Had to uncomment it so it can read the local image
<base href="http://www.w3.org/TR/ldp/TestCases">-->
<title>Linked Data Platform 1.0 Test Cases</title>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
class='remove' async></script>
<script class='remove'>
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus : "NOTE",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName : "ldp-test-cases",
// TODO: Confirm short name
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2013-03-07",
//previousMaturity: "FPWD",
//previousURI: "http://www.w3.org/TR/2013/WD-ldp-20130307/",
// if there a publicly available Editor's Draft, this is the link
//edDraftURI: "http://www.w3.org/2012/ldp/hg/ldp.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
//extraCSS: ["https://dvcs.w3.org/hg/ldpwg/css/respec.css"],
// editors, add as many as you like
// only "name" is required
editors : [
{
name : "Raúl García-Castro",
url : "http://www.garcia-castro.com/",
company : "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL : "http://www.oeg-upm.net/"
},
{
name : "Fernando Serena",
company : "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL : "http://www.oeg-upm.net/"
}
//{ name: "John Arwe", url: "https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/allcommunities?userid=120000CAW7",
// company: "IBM Corporation", companyURL: "http://ibm.com/" },
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg : "Linked Data Platform Working Group",
// URI of the public WG page
wgURI : "http://www.w3.org/2012/ldp",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList : "public-ldp-wg",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI : "http://www.w3.org/2004/01/pp-impl/55082/status",
doRDFa : "1.1",
+<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
prefix="td: http://www.w3.org/2006/03/test-description# tn: http://ldp.example.org/NewTestDefinitions# ht: http://www.w3.org/2011/http#">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- rgarcia: Had to uncomment it so it can read the local image
<base href="http://www.w3.org/TR/ldp/TestCases">-->
<title>Linked Data Platform 1.0 Test Cases</title>
<script src='https://www.w3.org/Tools/respec/respec-w3c-common'
class='remove' async></script>
<script class='remove'>
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus : "NOTE",
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName : "ldp-testsuite",
// TODO: Confirm short name
// if your specification has a subtitle that goes below the main
// formal title, define it here
// subtitle : "an excellent document",
// if you wish the publication date to be other than today, set this
// publishDate: "2009-08-06",
// if the specification's copyright date is a range of years, specify
// the start date here:
// copyrightStart: "2005"
// if there is a previously published draft, uncomment this and set its YYYY-MM-DD date
// and its maturity status
//previousPublishDate: "2013-03-07",
//previousMaturity: "FPWD",
//previousURI: "http://www.w3.org/TR/2013/WD-ldp-20130307/",
// if there a publicly available Editor's Draft, this is the link
//edDraftURI: "http://www.w3.org/2012/ldp/hg/ldp.html",
// if this is a LCWD, uncomment and set the end of its review period
// lcEnd: "2009-08-05",
// if you want to have extra CSS, append them to this list
// it is recommended that the respec.css stylesheet be kept
//extraCSS: ["https://dvcs.w3.org/hg/ldpwg/css/respec.css"],
// editors, add as many as you like
// only "name" is required
editors : [
{
name : "Raúl García-Castro",
url : "http://www.garcia-castro.com/",
company : "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL : "http://www.oeg-upm.net/"
},
{
name : "Fernando Serena",
company : "Ontology Engineering Group, Universidad Politécnica de Madrid",
companyURL : "http://www.oeg-upm.net/"
},
{ name: "Steve Speicher", url: "http://stevespeicher.blogspot.com",
company: "IBM Corporation", companyURL: "http://ibm.com/"
}
],
// authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
//authors: [
// { name: "Your Name", url: "http://example.org/",
// company: "Your Company", companyURL: "http://example.com/" },
//],
// name of the WG
wg : "Linked Data Platform Working Group",
// URI of the public WG page
wgURI : "http://www.w3.org/2012/ldp",
// name (without the @w3c.org) of the public mailing to which comments are due
wgPublicList : "public-ldp-wg",
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
// document unless you know what you're doing. If in doubt ask your friendly neighbourhood
// Team Contact.
wgPatentURI : "http://www.w3.org/2004/01/pp-impl/55082/status",
doRDFa : "1.1",
localBiblio: {
"LDP-PRIMER": {
title: "Linked Data Platform 1.0 Primer",
href: "https://dvcs.w3.org/hg/ldpwg/raw-file/tip/ldp-primer/ldp-primer.html",
authors: [
"Nandana Mihindukulasooriya",
- "Roger Menday"
],
status: "WD",
deliveredBy: [
"http://www.w3.org/2012/ldp/"
],
publisher: "W3C"
}
}
};
</script>
</head>
<body>
<section id='abstract'>
<p>The Linked Data Platform specification, informally LDP,
describes the use of HTTP for accessing, updating, creating and
deleting resources from servers that expose their resources as Linked
Data. This document describes the conditions that LDP servers must
satisfy in order to be conformant with the specification and presents
a common format for describing LDP test cases and server results.
These test cases both illustrate the features of the specification and
can be used for testing conformance.</p>
</section>
<section id='sotd'>
<p>
<!--Empty. Nothing else to add.-->
</p>
</section>
<section>
<h2>
Introduction
</h2>
<p>
This document describes a test suite that can be used to evaluate the
conformance of LDP servers to the LDP specification
[[LINKED-DATA-PLATFORM]]. The document also presents the design
principles that guided the development of the test suite, a testing
process, and a common format for describing test cases and server
results. <br> The purpose of the test cases is to illustrate the
specification features and to help in testing conformance. The
provided set of test cases is "incomplete" in the sense that passing
all the tests does not prove that a given system conforms to the LDP
specification; failing a test does, however, prove that the system
does not conform to the specification.
<br> The presented format is intended to facilitate the use of
tests by LDP server developers, e.g., in a test harness, as well as
the extension of the test suite with new tests. Developers can check
the LDP Primer [[LDP-PRIMER]] for concrete examples of inputs and
expected outputs that can be used for testing.
</p>
</section>
<section>
<h2>
Design principles
</h2>
<section>
<h3>
Generic vs domain-specific servers
</h3>
<p>There will be two types of systems implementing the LDP
specification:</p>
<ul>
<li>Generic RDF storage systems that allow interacting with their
resources by means of the LDP specification. These servers do not
impose any restriction on LDPRs.</li>
<li>Systems exposing their data using the LDP specification.
These systems impose restrictions on LDPRs since they have an
underlying business logic and data model.</li>
</ul>
<p>In order to cover both types of systems, we do not provide
specific input data in the test suite. It is up to the evaluator to
define specific input data for a certain system. Evaluators must
include these input data along with the results when reporting the
results of a certain system.</p>
</section> <section>
<h3>
Protocol evaluation vs data evaluation
</h3>
<p>The LDP specification includes restrictions on LDP servers at
the protocol level and at the data level. Currently, the restrictions
at the data level are minimal and servers are not forced to have a
certain behaviour when processing LDPR representations. Therefore, the
test suite evaluates LDP servers at a protocol level; the only
exception is in the case of LDPCs, since they are required to include
an rdf.type statement in their representation.</p>
<p>It is out of the scope of the test suite to test LDP servers in
terms of the restrictions imposed by their underlying data models.</p>
</section> <section>
<h3>
Test suite coverage
</h3>
<p>
This test suite only covers those absolute requirements present in the
LDP specification (as stated by the use of the MUST key word). This
set of absolute requirements identifies the core subset of the LDP
specification,
<dfn>LDP Core</dfn>
from now on, and any LDP server that satisfies these absolute
requirements will be an LDP Core conformant server.
</p>
<p>It is out of the scope of this test suite to test other levels
of conformance in terms of optional capabilities (e.g., paging).</p>
<p>
Furthermore, the LDP specification [[LINKED-DATA-PLATFORM]] contains
the following absolute requirements for <a>LDP Core</a> that are not
directly testable and, therefore, are not covered by the current test
suite:
</p>
<ul>
<li>4.2.1.1 LDP servers MUST at least be HTTP/1.1 conformant servers [HTTP11].</li>
<li>4.2.1.5 LDP servers MUST assign the default base-URI for [RFC3987] relative-URI resolution to be the HTTP Request-URI when the resource already exists, and to the URI of the created resource when the request results in the creation of a new resource.</li>
<li>4.2.1.6 LDP servers MUST publish any constraints on LDP clients’ ability to create or update LDPRs, by adding a Link header with rel='describedby' [RFC5988] to all responses to requests which fail due to violation of those constraints.</li>
<li>4.2.2.2 LDP servers MUST support the HTTP response headers defined in section 4.2.8 HTTP OPTIONS.</li>
<li>4.2.4.1 If a HTTP PUT is accepted on an existing resource, LDP servers MUST replace the entire persistent state of the identified resource with the entity representation in the body of the request. [...] Any LDP servers that wish to support a more sophisticated merge of data provided by the client with existing state stored on the server for a resource MUST use HTTP PATCH, not HTTP PUT.</li>
<li>4.2.4.3 If an otherwise valid HTTP PUT request is received that attempts to change properties the server does not allow clients to modify, LDP servers MUST respond with a 4xx range status code (typically 409 Conflict).</li>
<li>4.2.4.4 If an otherwise valid HTTP PUT request is received that contains properties the server chooses not to persist, e.g. unknown content, LDP servers MUST respond with an appropriate 4xx range status code [HTTP11].</li>
<li>4.2.4.5 [...] LDP servers that require conditional requests MUST respond with status code 428 (Precondition Required) when the absence of a precondition is the only reason for rejecting the request [RFC6585].</li>
<li>4.2.7.1 LDP servers that support PATCH MUST include an Accept-Patch HTTP response header [RFC5789] on HTTP OPTIONS requests, listing patch document media type(s) supported by the server.</li>
<li>4.3.1.4 LDP servers MUST provide an RDF representation for LDP-RSs [...]</li>
<li>4.3.1.10 LDP servers MUST NOT require LDP clients to implement inferencing in order to recognize the subset of content defined by LDP.</li>
<li>5.2.3.12 If an LDPC server creates this associated LDP-RS it MUST indicate its location on the HTTP response using the HTTP Link response header with link relation describedby and href to be the URI of the associated LDP-RS resource [RFC5988].</li>
<li>5.2.3.13 LDP servers that support POST MUST include an Accept-Post response header on HTTP OPTIONS responses, listing post document media type(s) supported by the server.</li>
<li>5.2.5.1 When an LDPR identified by the object of a containment triple is deleted, the LDPC server MUST also remove the LDPR from the containing LDPC by removing the corresponding containment triple.</li>
<li>5.2.5.2 When an LDPR identified by the object of a containment triple is deleted, and the LDPC server created an associated LDP-RS (see the LDPC POST section), the LDPC server MUST also remove the associated LDP-RS it created.</li>
<li>5.2.8.1 When an LDPC server creates an LDP-NR (for example, one whose representation was HTTP POSTed to the LDPC) the LDP server might create an associated LDP-RS to contain data about the non-LDPR (see LDPC POST section). For LDP-NRs that have this associated LDP-RS, an LDPC server MUST provide an HTTP Link header whose target URI is the associated LDP-RS, and whose link relation type is describedby [RFC5988].</li>
<li>5.4.1.5 LDP Direct Containers MUST behave as if they have a ( LDPC URI, ldp:insertedContentRelation , ldp:MemberSubject ) triple, but LDP imposes no requirement to materialize such a triple in the LDP-DC representation.</li>
<li>5.4.3.1 When an LDPR identified by the object of a membership triple which was originally created by the LDP-DC is deleted, the LDPC server MUST also remove the corresponding membership triple.</li>
</ul>
</section> <section>
<h3>
Separation of results and assertions
</h3>
<p>Instead of defining expected results for tests, which will be
dependent on specific implementations, we have defined the assertions
to be made over test results. In order to successfully pass a test,
all of the assertions must be satisfied.</p>
<p>Separating test outputs and assertions has other benefits: it
makes simpler to report tool results and assertions can be made by a
third party.</p>
</section> <section>
<h3>
Traceability of test cases
</h3>
<p>Any test case and its produced results and assertions should be
related to those documents that are relevant for it (e.g.,
specifications, uses cases, etc.).</p>
</section> </section>
<section>
<h2>
Testing process
</h2>
<p>The LDP Test Cases are defined in this same page, which is
annotated using RDFa so that it can be consumed both by persons and
machines. The testing process is composed of two steps, depicted in
the figure below.</p>
<ol>
<li>The person or agent in charge of executing the test cases in
a specific LDP server will take the test case definitions and run
every test case on the LDP server. It is recommended (but not
required) that test execution is automated. The execution of test
cases must produce a test execution report for the LDP server, in RDF
format, that contains for every test case: the specific inputs used
during its execution, the produced outputs, and the assertion of
whether the test case is passed. The test execution report must be
available in the Web.</li>
<li>A report generator software will take all the LDP server
execution reports and will generate an implementation report that
includes the results of all the LDP servers.</li>
</ol>
<p>
<object data="TestingProcess.svg" type="image/svg+xml">Your
browser does not support SVG.</object>
</p>
</section>
<section>
<h2>
Describing testing artifacts in RDF
</h2>
<section>
<h3>
Namespaces used
</h3>
<p>
The following vocabularies are reused for describing the testing
artifacts: DOAP (
<code>doap</code>
), Dublin Core (
<code>dc</code>
) [[DC11]], FOAF (
<code>foaf</code>
) [[FOAF]], HTTP Vocabulary in RDF (
<code>ht</code>
) [[HTTP-IN-RDF]], and W3C Test Metadata (
<code>td</code>
) [[TEST-METADATA]].
</p>
<p>
All the new required entities that are not covered by those
vocabularies have been defined under a new namespace (
<code>tn</code>
). Besides, the LDP test cases have been defined under their own
namespace (
<code>ldptc</code>
).
</p>
<p>Next we present the definition of these namespaces and of all
the namespaces used in the examples.</p>
<pre>cnt: <http://www.w3.org/2011/content#>
dc: <http://purl.org/dc/terms/>
doap: <http://usefulinc.com/ns/doap#>
earl: <http://www.w3.org/ns/earl#>
foaf: <http://xmlns.com/foaf/0.1/>
ht: <http://www.w3.org/2011/http#>
httph: <http://www.w3.org/2011/http-headers#>
ldptc: <http://www.w3.org/TR/ldp/TestCases#>
td: <http://www.w3.org/2006/03/test-description#>
tn: <http://ldp.example.org/NewTestDefinitions#></pre> </section> <!--
<section>
<h3><a id="TestSuiteDescription">Test suite description</a></h3>
<p><em>To be completed</em></p>
</section>
--> <section>
<h3>
Test case description
</h3>
<p>
A
<dfn id="dfn-test-case" title="test case">test case</dfn>
is defined as an instance of the
<code>td:TestCase</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>rdfs:label</code>. The human-readable label of the
test.</li>
<li><code>dc:title</code>. The name of the test.</li>
<li><code>dc:description</code>. The description of the test.</li>
<li><code>dc:contributor</code>. The person (<code>foaf:Person</code>)
contributing the test.</li>
<li><code>td:reviewStatus</code>. The status of the test;
possible status are: <code>td:unreviewed</code>, <code>td:approved</code>
or <code>td:rejected</code>.</li>
<li><code>rdfs:seeAlso</code>. A link to the specification it
refers to.</li>
<li><code>td:specificationReference</code>. An <a href="#dfn-excerpt">excerpt</a> (<code>tn:Excerpt</code>)
of the specification that is relevant to the test.</li>
<li><code>td:input</code>. An <a href="#dfn-test-input">input</a> (<code>tn:TestInput</code>)
used in the test.</li>
<li><code>td:precondition</code>. A precondition that must be
satisfied before running the test.</li>
<li><code>tn:output</code>. An <a href="#dfn-test-output">output</a>
(<code>tn:TestOutput</code>) to be produced by the test.</li>
<li><code>tn:testProcess</code>. The list of <a href="#dfn-step">steps</a>
(<code>tn:Step</code>) to be performed during the test.</li>
<li><code>tn:testAssertion</code>. An <a
href="#dfn-test-assertion">assertion</a> (<code>tn:TestAssertion</code>)
to be performed over the test output.</li>
</ul>
<p>
An
<dfn id="dfn-excerpt" title="excerpt">excerpt</dfn>
is defined as an instance of the
<code>tn:Excerpt </code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>rdfs:seeAlso</code>: The document where the excerpt is
included.</li>
<li><code>tn:includesText</code>. The excerpt from the document.</li>
</ul>
<p>
A
<dfn id="dfn-test-input" title="test input">test input</dfn>
is defined as an instance of the
<code>td:TestInput </code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test input.</li>
<li><code>dc:description</code>. The description of the test
input.</li>
</ul>
<p>
A
<dfn id="dfn-test-output" title="test output">test output</dfn>
is defined as an instance of the
<code>td:TestOutput</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test output.</li>
<li><code>dc:description</code>. The description of the test
output.</li>
<li><code>tn:fromStep</code>. The <a href="#dfn-step">step</a> in
the process in which the output is produced.</li>
</ul>
<p>
In the LDP test cases, test outputs are expected to be HTTP responses
(
<code>ht:Response</code>
).
</p>
<p>
A
<dfn id="dfn-step" title="step">step</dfn>
in the test process is defined as an instance of the
<code>td:Step</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:description</code>. The description of the step.</li>
<li><code>tn:usesInput</code>. A <a href="#dfn-test-input">test
input</a> used in the step.</li>
</ul>
<p>
In the LDP test cases, steps are expected to be HTTP requests (
<code>ht:Request</code>
).
</p>
<p>
A
<dfn id="dfn-test-assertion" title="test assertion">test
assertion</dfn>
is defined as an instance of the
<code>td:TestAssertion</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test assertion.</li>
<li><code>dc:description</code>. The description of the test
assertion.</li>
<li><code>tn:outputAsserted</code>. An <a href="#dfn-test-output">output</a>
under assertion.</li>
</ul>
<p>The following example contains the description of one of the LDP
test cases.</p>
<pre class="example" id="test-case-example">:TCR1 a td:TestCase;
rdfs:label "TC-R1";
dc:title "GET on an LDPR";
dc:description "Tests making a GET request on an existing LDPR";
dc:contributor :RaulGarciaCastro;
td:reviewStatus td:unreviewed;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
td:specificationReference [
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.8 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.3.1 LDPR servers MUST support the HTTP GET Method for LDPRs.".
];
td:input :TCR1-I1-LDPR-URI;
td:precondition "The LDP server contains an LDPR at <LDPR URI>";
tn:output :TCR1-O1-Response-1-GET;
tn:testProcess (:TCR1-RQ1-GET-LDPR-URI);
tn:testAssertion :TCR1-A1-Response-1-GET.
:RaulGarciaCastro a foaf:Person;
rdfs:label "Raúl García-Castro";
owl:sameAs <http://www.garcia-castro.com/#me>.
:TCR1-I1-LDPR-URI a tn:TestInput;
dc:title "<LDPR URI>";
dc:description "The URI of an LDPR".
:TCR1-O1-Response-1-GET a tn:TestOutput;
a ht:Response;
tn:fromStep :TCR1-RQ1-GET-LDPR-URI;
dc:title "<Response 1 GET>";
dc:description "The response of the GET request in step 1".
:TCR1-RQ1-GET-LDPR-URI a tn:Step;
a ht:Request;
dc:description "GET <LDPR URI>";
tn:usesInput :TCR1-I1-LDPR-URI.
:TCR1-A1-Response-1-GET a tn:TestAssertion;
tn:outputAsserted :TCR1-O1-Response-1-GET;
dc:title "GET correct";
dc:description """[Status-Line].Status-Code = 2xx
[response-header].ETag exists
[response-header].Link includes ldp:Resource; rel="type"""".
</pre> </section> <section>
<h3>
Execution report description
</h3>
<p>
A
<dfn id="dfn-test-execution" title="test execution">test
execution</dfn>
is defined as an instance of the
<code>tn:TestExecution</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:testExecuted</code>. The <a href="#dfn-test-case">test
case</a> (<code>td:TestCase</code>) used in the execution.</li>
<li><code>tn:subjectTested</code>. The subject (<code>doap:Project</code>)
tested.</li>
<li><code>dc:date</code>. The date when the test was executed.</li>
<li><code>tn:inputUsed</code>. The <a
href="#dfn-test-input-value">input value</a> (<code>tn:TestInputValue</code>)
used in the execution.</li>
<li><code>tn:outputProduced</code>. The <a
href="#dfn-test-output-value">output value</a> (<code>tn:TestOutputValue</code>)
produced in the execution.</li>
</ul>
<p>
A
<dfn id="dfn-test-input-value" title="test input value">test
input value</dfn>
is defined as an instance of the
<code>tn:TestInputValue</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:relatedInput</code>. The <a href="#dfn-test-input">input</a>
in the test definition (<code>tn:TestInput</code>) for which the
value is defined.</li>
<li><code>tn:inputValue</code>. The specific input defined for
the execution.</li>
</ul>
<p>
A
<dfn id="dfn-test-output-value" title="test output value">test
output value</dfn>
is defined as an instance of the
<code>tn:TestOutputValue</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:relatedOutput</code>. The <a href="#dfn-test-output">output</a>
in the test definition (<code>tn:TestOutput</code>) for which the
value is defined.</li>
<li><code>tn:outputValue</code>. The specific output defined for
the execution.</li>
</ul>
<p>
In the LDP test cases, test output values are expected to be HTTP
responses (
<code>ht:Response</code>
).
</p>
<p>The following example contains the description of one test
execution.</p>
<pre class="example" id="execution-report-example">:TCR1-Execution a tn:TestExecution;
tn:testExecuted ldptc:TCR1;
tn:subjectTested :SomeServer;
dc:date "2013-03-30T09:30:10";
tn:inputUsed [
a tn:TestInputValue ;
tn:relatedInput :TCR1-I1-LDPR-URI ;
tn:inputValue <http://www.example.org/MyResource> .
];
tn:outputProduced [
a tn:TestOutputValue ;
tn:relatedOutput :TCR1-O1-Response-1-GET ;
tn:outputValue :TCR1-Exec-Response-1-GET .
].
:SomeServer a doap:Project;
doap:name "Sample server".
:TCR1-Exec-Response-1-GET a ht:Response;
ht:httpVersion "1.1";
dc:date "2013-03-30T09:30:10";
ht:sc <http://www.w3.org/2011/http-statusCodes#OK>;
ht:statusCodeValue "200";
ht:reasonPhrase "OK";
ht:headers (
[
a ht:ResponseHeader;
ht:hdrName httph:etag;
ht:fieldName "ETag";
ht:fieldValue "hd73hck43".
]
[
a ht:EntityHeader;
ht:hdrName httph:content-type;
ht:fieldName "Content-Type";
ht:fieldValue "text/turtle; charset=utf-8".
]
);
ht:body [
a cnt:ContentAsText ;
cnt:chars """
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix dc: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<http://example.org/MyResource>
a ldp:Resource;
dc:title "My LDP resource".
""";
cnt:characterEncoding "UTF-8".
].
</pre> </section> <section>
<h3>
Test case assertion description
</h3>
<p>
An
<dfn id="dfn-assertion" title="assertion">assertion</dfn>
is defined as an instance of the
<code>earl:Assertion</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>earl:subject</code>.The subject (<code>doap:Project</code>)
asserted.</li>
<li><code>earl:test</code>. The <a href="#dfn-test-case">test
case</a> (<code>td:TestCase</code>) to which the assertion refers to.</li>
<li><code>tn:fromTestExecution</code>. The <a
href="#dfn-test-execution">test execution</a> (<code>td:TestExecution</code>)
used in the assertion.</li>
<li><code>dc:date</code>. The date when the assertion was
performed.</li>
<li><code>earl:assertedBy</code>. The validator (<code>doap:Project</code>)
that makes the assertion.</li>
<li><code>
<code>earl:mode</code>
.
</code> The execution mode of the validator. In this case it will always be
<code>earl:automatic</code>.</li>
<li><code>earl:result</code>. The outcome value (<code>earl:OutcomeValue</code>)
of the assertion.</li>
</ul>
<p>The following example contains the description of one test
assertion.</p>
<pre class="example" id="test-assertion-example">:TCR1-Assertion-SomeServer a earl:Assertion;
earl:subject sr:SomeServer;
earl:test ldptc:TCR1;
tn:fromTestExecution sr:TCR1-Execution;
dc:date "2013-03-30T09:30:10";
earl:assertedBy :Validator;
earl:mode: earl:automatic;
earl:result [
a earl:OutcomeValue ;
earl:outcome earl:passed .
].
:Validator a doap:Project;
doap:name "Some validator".</pre> </section> </section>
<section>
<h2>
Tests for LDPRs
</h2>
<p>These tests involve only LDPRs.</p>
<!-- TC-R1: GET on an LDPR -->
<section resource="#TCR1" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-R1</span>.
<span property="dc:title">GET on an LDPR</span>
</h3>
<p property="dc:description">Tests making a GET request on an existing LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person">
<strong>Contributor: </strong><span property="rdfs:label">Raúl García-Castro</span>
<span property="owl:sameAs" href="http://www.garcia-castro.com/#me"></span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a>:</em>
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR1-I1-LDPR-URI" typeof="tn:TestInput">
<em property="dc:title"><LDPR URI></em>.
<span property="dc:description">The URI of an LDPR.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR1-RQ1-GET-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR1-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCR1-RQ1-GET-LDPR-URI"></span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR1-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCR1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource; rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-R2: HEAD on an LDPR -->
<section resource="#TCR2" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-R2</span>.
<span property="dc:title">HEAD on an LDPR</span>
</h3>
<p property="dc:description">Tests making a HEAD request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Raúl García-Castro</span>
<span property="owl:sameAs" href="http://www.garcia-castro.com/#me"></span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.6.1 LDP servers MUST support the HTTP HEAD method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<p>
<em><a target="_blank" href="http://tools.ietf.org/html/rfc2616" property="rdfs:seeAlso">Hypertext Transfer Protocol - HTTP/1.1</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span>
<span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR2-I1-LDPR-URI" typeof="tn:TestInput">
<em property="dc:title"><LDPR URI></em>.
<span property="dc:description">The URI of an LDPR.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCR2-RQ1-HEAD-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR2-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR2-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 HEAD></em>.
<span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCR2-RQ1-HEAD-LDPR-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR2-A1-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCR2-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource; rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-R3: OPTIONS on an LDPR -->
<section resource="#TCR3" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-R3</span>.
<span property="dc:title">OPTIONS on an LDPR</span>
</h3>
<p property="dc:description">Tests making an OPTIONS request on an LDPR.</p>
<p property="dc:contributor" resource="#RaulGarciaCastro" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Raúl García-Castro</span>
<span property="owl:sameAs" href="http://www.garcia-castro.com/#me"></span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/" property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag
header values.</span><span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.1 LDP servers MUST support the HTTP OPTIONS method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.2 LDP servers MUST indicate their support for HTTP Methods by responding to a HTTP OPTIONS request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header Allow.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCR3-I1-LDPR-URI" typeof="tn:TestInput">
<em property="dc:title"><LDPR URI></em>.
<span property="dc:description">The URI of an LDPR.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDPR at <LDPR URI></li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess"
resource="#TCR3-RQ1-OPTIONS-LDPR-URI" typeof="tn:Step ht:Request">
<div property="dc:description">OPTIONS <LDPR URI></div>
<span property="tn:usesInput" resource="#TCR3-I1-LDPR-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCR3-O1-Response-1-OPTIONS" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 OPTIONS></em>.
<span property="dc:description">The response of the OPTIONS request in step 1.</span>
<span property="tn:fromStep" resource="#TCR3-RQ1-OPTIONS-LDPR-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCR3-A1-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCR3-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource; rel="type"</li>
<li>[entity-header].Allow exists</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
</section>
<section>
<h2>
Tests for LDP Basic Containers
</h2>
<p>These tests involve LDP-BCs and LDPRs.</p>
<!-- TC-BC1: Get on an empty LDP-BC -->
<section resource="#TCBC1" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC1</span>.
<span property="dc:title">GET on an empty LDP-BC</span>
</h3>
<p property="dc:description">Tests making a GET request on an empty LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC1-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
<li property="td:precondition">The LDP Basic Container is empty.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC1-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC1-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC1-RQ1-GET-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC1-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC1-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC1-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resources</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-BC URI> ldp:contains <?x>.</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-BC2: Get on a non-empty LDP-BC -->
<section resource="#TCBC2" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC2</span>.
<span property="dc:title">GET on a non-empty LDP-BC</span>
</h3>
<p property="dc:description">Tests making a GET request on a non-empty LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC2-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
<li property="td:input" resource="#TCBC2-I2-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><C URI></em>.
<span property="dc:description">The URI of a resource in the container.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
<li property="td:precondition">The LDP Basic Container contains a resource at <C URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC2-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC2-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC2-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC2-RQ1-GET-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC2-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC2-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC2-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container contains resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-BC URI> ldp:contains <C URI></li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-BC3: POST an LDP-NR on an LDP-BC -->
<section resource="#TCBC3" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC3</span>.
<span property="dc:title">POST an LDP-NR on an LDP-BC</span>
</h3>
<p property="dc:description">Tests making a POST request of an LDP-NR on an LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.4.1.1 Each LDP Non-RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.1 If the resource was created successfully, LDP servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC3-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
<li property="td:input" resource="#TCBC3-I2-LDPNR-REP"
typeof="tn:TestInput"><em property="dc:title"><LDP-NR representation></em>.
<span property="dc:description">The representation of the LDP-NR to be created.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
<li property="td:precondition">The LDP-BC at <LDP-BC URI> allows POSTS of LDP-NRs.</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC3-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC3-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDP-BC URI></div>
<ul>
<li>[message-body] = <LDP-NR representation></li>
</ul>
<span property="tn:usesInput" resource="#TCBC3-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCBC3-I2-LDPNR-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC3-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC3-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC3-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC3-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC3-O2-Response-2-POST" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 POST></em>.
<span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCBC3-RQ2-POST-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC3-O3-Response-3-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCBC3-RQ3-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC3-O4-Response-4-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 4 GET></em>.
<span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCBC3-RQ4-GET-LOC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC3-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-BC URI> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A4-Response-2-POST" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O2-Response-2-POST">
Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link includes ldp:Resource, ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A5-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">container contains new resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-BC> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC3-A8-Response-4-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC3-O4-Response-4-GET">
Assert <Response 4 GET> (<span property="dc:title">GET new resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-BC4: POST an LDP-RS on an LDP-BC -->
<section resource="#TCBC4" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC4</span>.
<span property="dc:title">POST an LDP-RS on an LDP-BC</span>
</h3>
<p property="dc:description">Tests making a POST request of an LDP-RS on an LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.1 If the resource was created successfully, LDP servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.4 LDP servers that successfully create a resource from a RDF representation in the request entity body MUST honor the client's requested interaction model(s). [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.5 LDP servers MUST accept a request entity body with a request header of Content-Type with value of text/turtle [turtle].</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.7 In RDF representations, LDP servers MUST interpret the null relative URI for the subject of triples in the LDPR representation in the request entity body as referring to the entity in the request body.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC4-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
<li property="td:input" resource="#TCBC4-I2-LDPRS-REP"
typeof="tn:TestInput"><em property="dc:title"><LDP-RS representation></em>.
<span property="dc:description">The representation of the LDP-RS to be created.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
<li property="td:precondition">The LDP-BC at <LDP-BC URI> allows POSTS of LDP-RSs.</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource.</li>
<li property="td:precondition"><LDP-RS representation> is in text/turtle.</li>
<li property="td:precondition"><LDP-RS representation> is a valid representation for a resource to be created in the LDP-BC.</li>
<li property="td:precondition"><LDP-RS representation> uses null relative URI as the entity in the request body.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC4-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC4-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDP-BC URI></div>
<ul>
<li>[entity-header].Content-type = text/turtle</li>
<li>[message-body] = <LDP-RS representation></li>
</ul>
<span property="tn:usesInput" resource="#TCBC4-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCBC4-I2-LDPRS-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC4-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCBC4-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC4-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC4-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC4-O2-Response-2-POST" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 POST></em>.
<span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCBC4-RQ2-POST-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC4-O3-Response-3-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCBC4-RQ3-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCBC4-O4-Response-4-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 4 GET></em>.
<span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCBC4-RQ4-GET-LOC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC4-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-BC URI> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A4-Response-2-POST" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O2-Response-2-POST">
Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link includes ldp:Resource, ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A5-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">container contains new resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-BC> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC4-A8-Response-4-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC4-O4-Response-4-GET">
Assert <Response 4 GET> (<span property="dc:title">GET new resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-BC5: HEAD on an LDP-BC -->
<section resource="#TCBC5" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC5</span>.
<span property="dc:title">HEAD on an LDP-BC</span>
</h3>
<p property="dc:description">Tests making a HEAD request on an LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.6.1 LDP servers MUST support the HTTP HEAD method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<p>
<em><a target="_blank" href="http://tools.ietf.org/html/rfc2616"
property="rdfs:seeAlso">Hypertext Transfer Protocol - HTTP/1.1</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span>
<span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC5-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC5-RQ1-HEAD-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC5-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC5-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 HEAD></em>.
<span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC5-RQ1-HEAD-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC5-A1-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC5-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC5-A2-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC5-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-BC6: OPTIONS on an LDP-BC -->
<section resource="#TCBC6" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-BC6</span>.
<span property="dc:title">OPTIONS on an LDP-BC</span>
</h3>
<p property="dc:description">Tests making a OPTIONS request on an LDP Basic Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag OPTIONSer values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.1 LDP servers MUST support the HTTP OPTIONS method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.2 LDP servers MUST indicate their support for HTTP Methods by responding to a HTTP OPTIONS request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header Allow.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.3.1.1 Each LDP Basic Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCBC6-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-BC URI></em>.
<span property="dc:description">The URI of an LDP-BC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Basic Container at <LDP-BC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCBC6-RQ1-OPTIONS-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">OPTIONS <LDP-BC URI></div>
<span property="tn:usesInput" resource="#TCBC6-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCBC6-O1-Response-1-OPTIONS" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 OPTIONS></em>.
<span property="dc:description">The response of the OPTIONS request in step 1.</span>
<span property="tn:fromStep" resource="#TCBC6-RQ1-OPTIONS-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCBC6-A1-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC6-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[entity-header].Allow exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCBC6-A2-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCBC6-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:BasicContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
</section>
<section>
<h2>
Tests for LDP Direct Containers
</h2>
<p>These tests involve LDP-DCs and LDPRs.</p>
<!-- TC-DC1: Get on an empty LDP-DC -->
<section resource="#TCDC1" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC1</span>.
<span property="dc:title">GET on an empty LDP-DC</span>
</h3>
<p property="dc:description">Tests making a GET request on an empty LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC1-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
<li property="td:input" resource="#TCDC1-I2-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCDC1-I3-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
<li property="td:precondition">The LDP Direct Container is empty.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">The membership resource of the LDP-DC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-DC is <M URI>.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC1-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC1-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC1-RQ1-GET-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC1-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC1-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET direct container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC1-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resources</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-DC URI> ldp:contains <?x>.</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-DC2: Get on a non-empty LDP-DC -->
<section resource="#TCDC2" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC2</span>.
<span property="dc:title">GET on a non-empty LDP-DC</span>
</h3>
<p property="dc:description">Tests making a GET request on a non-empty LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.2.1 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, the LDPC MUST update its membership triples to reflect that addition, and the resulting membership triple MUST be consistent with any LDP-defined predicates it exposes.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC2-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
<li property="td:input" resource="#TCDC2-I2-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCDC2-I3-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
<li property="td:input" resource="#TCDC2-I4-C-URI"
typeof="tn:TestInput"><em property="dc:title"><C URI></em>.
<span property="dc:description">The URI of a contained resource.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
<li property="td:precondition">The LDP Direct Container created a resource at <C URI>.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">The membership resource of the LDP-DC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-DC is <M URI>.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC2-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC2-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC2-RQ2-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <R URI></div>
<span property="tn:usesInput" resource="#TCDC2-I2-R-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC2-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC2-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC2-O2-Response-2-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 GET></em>.
<span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCDC2-RQ2-GET-R-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC2-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC2-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET direct container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC2-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container contains resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-DC URI> ldp:contains <C URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC2-A4-Response-2-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC2-O2-Response-2-GET">
Assert <Response 2 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC2-A5-Response-2-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC2-O2-Response-2-GET">
Assert <Response 2 GET> (<span property="dc:title">resource contains triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <R URI> <M URI> <C URI></li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-DC3: POST an LDP-NR on an LDP-DC -->
<section resource="#TCDC3" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC3</span>.
<span property="dc:title">POST an LDP-NR on an LDP-DC</span>
</h3>
<p property="dc:description">Tests making a POST request of an LDP-NR on an LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.4.1.1 Each LDP Non-RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.1 If the resource was created successfully, LDP servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.2.1 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, the LDPC MUST update its membership triples to reflect that addition, and the resulting membership triple MUST be consistent with any LDP-defined predicates it exposes.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC3-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
<li property="td:input" resource="#TCDC3-I2-LDPNR-REP"
typeof="tn:TestInput"><em property="dc:title"><LDP-NR representation></em>.
<span property="dc:description">The representation of the LDP-NR to be created.</span>
</li>
<li property="td:input" resource="#TCDC3-I3-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCDC3-I4-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
<li property="td:precondition">The LDP-DC at <LDP-DC URI> allows POSTS of LDP-NRs.</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource.</li>
<li property="td:precondition">The membership resource of the LDP-DC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-DC is <M URI>.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC3-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC3-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDP-DC URI></div>
<ul>
<li>[message-body] = <LDP-NR representation></li>
</ul>
<span property="tn:usesInput" resource="#TCDC3-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCDC3-I2-LDPNR-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC3-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC3-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC3-RQ5-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <R URI></div>
<span property="tn:usesInput" resource="#TCDC3-I3-R-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC3-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC3-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC3-O2-Response-2-POST" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 POST></em>.
<span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCDC3-RQ2-POST-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC3-O3-Response-3-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCDC3-RQ3-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC3-O4-Response-4-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 4 GET></em>.
<span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCDC3-RQ4-GET-LOC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC3-O5-Response-5-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 5 GET></em>.
<span property="dc:description">The response of the GET request in step 5.</span>
<span property="tn:fromStep" resource="#TCDC3-RQ5-GET-R-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC3-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET direct container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-DC URI> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A4-Response-2-POST" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O2-Response-2-POST">
Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link includes ldp:Resource, ldp:DirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A5-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET basic container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">container contains new resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-DC> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A8-Response-4-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O4-Response-4-GET">
Assert <Response 4 GET> (<span property="dc:title">GET new resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A9-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">GET membership resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC3-A10-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC3-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">resource has triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <R URI> <M URI> <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-DC4: POST an LDP-RS on an LDP-DC -->
<section resource="#TCDC4" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC4</span>.
<span property="dc:title">POST an LDP-RS on an LDP-DC</span>
</h3>
<p property="dc:description">Tests making a POST request of an LDP-RS on an LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.1 If the resource was created successfully, LDP servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.4 LDP servers that successfully create a resource from a RDF representation in the request entity body MUST honor the client's requested interaction model(s). [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.5 LDP servers MUST accept a request entity body with a request header of Content-Type with value of text/turtle [turtle].</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.7 In RDF representations, LDP servers MUST interpret the null relative URI for the subject of triples in the LDPR representation in the request entity body as referring to the entity in the request body.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.2.1 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, the LDPC MUST update its membership triples to reflect that addition, and the resulting membership triple MUST be consistent with any LDP-defined predicates it exposes.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC4-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
<li property="td:input" resource="#TCDC4-I2-LDPRS-REP"
typeof="tn:TestInput"><em property="dc:title"><LDP-RS representation></em>.
<span property="dc:description">The representation of the LDP-RS to be created.</span>
</li>
<li property="td:input" resource="#TCDC4-I3-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCDC4-I4-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
<li property="td:precondition">The LDP-DC at <LDP-DC URI> allows POSTS of LDP-RSs.</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource.</li>
<li property="td:precondition">The membership resource of the LDP-DC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-DC is <M URI>.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
<li property="td:precondition"><LDP-RS representation> is in text/turtle.</li>
<li property="td:precondition"><LDP-RS representation> is a valid representation for a resource to be created in the LDP-DC.</li>
<li property="td:precondition"><LDP-RS representation> uses null relative URI as the entity in the request body.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC4-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC4-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDP-DC URI></div>
<ul>
<li>[entity-header].Content-type = text/turtle</li>
<li>[message-body] = <LDP-RS representation></li>
</ul>
<span property="tn:usesInput" resource="#TCDC4-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCDC4-I2-LDPRS-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC4-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC4-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC4-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
<li inlist="" property="tn:testProcess" resource="#TCDC4-RQ5-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <R URI></div>
<span property="tn:usesInput" resource="#TCDC4-I3-R-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC4-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC4-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC4-O2-Response-2-POST" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 POST></em>.
<span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCDC4-RQ2-POST-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC4-O3-Response-3-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCDC4-RQ3-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC4-O4-Response-4-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 4 GET></em>.
<span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCDC4-RQ4-GET-LOC-URI"> </span>
</li>
<li property="td:output" resource="#TCDC4-O5-Response-5-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 5 GET></em>.
<span property="dc:description">The response of the GET request in step 5.</span>
<span property="tn:fromStep" resource="#TCDC4-RQ5-GET-R-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC4-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET direct container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-DC URI> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A4-Response-2-POST" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O2-Response-2-POST">
Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link includes ldp:Resource, ldp:DirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A5-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET direct container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-DC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-DC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-DC URI> ldp:isMemberOfRelation <M URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">container contains new resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-DC> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A8-Response-4-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O4-Response-4-GET">
Assert <Response 4 GET> (<span property="dc:title">GET new resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A9-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">GET membership resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC4-A10-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC4-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">resource has triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <R URI> <M URI> <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-DC5: HEAD on an LDP-DC -->
<section resource="#TCDC5" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC5</span>.
<span property="dc:title">HEAD on an LDP-DC</span>
</h3>
<p property="dc:description">Tests making a HEAD request on an LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.6.1 LDP servers MUST support the HTTP HEAD method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<p>
<em><a target="_blank" href="http://tools.ietf.org/html/rfc2616"
property="rdfs:seeAlso">Hypertext Transfer Protocol - HTTP/1.1</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span>
<span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC5-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC5-RQ1-HEAD-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC5-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC5-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 HEAD></em>.
<span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC5-RQ1-HEAD-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC5-A1-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC5-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC5-A2-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC5-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-DC6: OPTIONS on an LDP-DC -->
<section resource="#TCDC6" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-DC6</span>.
<span property="dc:title">OPTIONS on an LDP-DC</span>
</h3>
<p property="dc:description">Tests making a OPTIONS request on an LDP Direct Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag OPTIONSer values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.1 LDP servers MUST support the HTTP OPTIONS method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.2 LDP servers MUST indicate their support for HTTP Methods by responding to a HTTP OPTIONS request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header Allow.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCDC6-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-DC URI></em>.
<span property="dc:description">The URI of an LDP-DC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Direct Container at <LDP-DC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCDC6-RQ1-OPTIONS-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">OPTIONS <LDP-DC URI></div>
<span property="tn:usesInput" resource="#TCDC6-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCDC6-O1-Response-1-OPTIONS" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 OPTIONS></em>.
<span property="dc:description">The response of the OPTIONS request in step 1.</span>
<span property="tn:fromStep" resource="#TCDC6-RQ1-OPTIONS-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCDC6-A1-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC6-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[entity-header].Allow exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCDC6-A2-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCDC6-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:DirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
</section>
</section>
<section>
<h2>
Tests for LDP Indirect Containers
</h2>
<p>These tests involve LDP-ICs and LDPRs.</p>
<!-- TC-IC1: Get on an empty LDP-IC -->
<section resource="#TCIC1" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-IC1</span>.
<span property="dc:title">GET on an empty LDP-IC</span>
</h3>
<p property="dc:description">Tests making a GET request on an empty LDP Indirect Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.1 Each LDP Indirect Container MUST also be a conforming LDP Direct Container [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.2 LDP Indirect Containers MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:insertedContentRelation, and whose object ICR describes how the member-derived-URI in the container's membership triples is chosen.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCIC1-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-IC URI></em>.
<span property="dc:description">The URI of an LDP-IC.</span>
</li>
<li property="td:input" resource="#TCIC1-I2-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCIC1-I3-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
<li property="td:input" resource="#TCIC1-I4-I-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Indirect Container at <LDP-IC URI>.</li>
<li property="td:precondition">The LDP Indirect Container is empty.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">The membership resource of the LDP-IC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-IC is <M URI>.</li>
<li property="td:precondition">The inserted content relation of the LDP-IC is <I URI>.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCIC1-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC1-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCIC1-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCIC1-RQ1-GET-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCIC1-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC1-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET indirect container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-IC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-IC URI> ldp:isMemberOfRelation <M URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:insertedContentRelation <I URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC1-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC1-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resources</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-IC URI> ldp:contains <?x>.</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-IC2: Get on a non-empty LDP-IC -->
<section resource="#TCIC2" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-IC2</span>.
<span property="dc:title">GET on a non-empty LDP-IC</span>
</h3>
<p property="dc:description">Tests making a GET request on a non-empty LDP Indirect Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.2.1 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, the LDPC MUST update its membership triples to reflect that addition, and the resulting membership triple MUST be consistent with any LDP-defined predicates it exposes.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.1 Each LDP Indirect Container MUST also be a conforming LDP Direct Container [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.2 LDP Indirect Containers MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:insertedContentRelation, and whose object ICR describes how the member-derived-URI in the container's membership triples is chosen.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.2.1 LDPCs whose ldp:insertedContentRelation triple has an object other than ldp:MemberSubject and that create new resources MUST add a triple to the container whose subject is the container's URI, whose predicate is ldp:contains, and whose object is the newly created resource's URI (which will be different from the member-derived URI in this case). This ldp:contains triple can be the only link from the container to the newly created resource in certain cases.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCIC2-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-IC URI></em>.
<span property="dc:description">The URI of an LDP-IC.</span>
</li>
<li property="td:input" resource="#TCIC2-I2-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCIC2-I3-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
<li property="td:input" resource="#TCIC2-I4-I-URI"
typeof="tn:TestInput"><em property="dc:title"><I URI></em>.
<span property="dc:description">The URI of a property.</span>
</li>
<li property="td:input" resource="#TCIC2-I5-C-URI"
typeof="tn:TestInput"><em property="dc:title"><C URI></em>.
<span property="dc:description">The URI of a contained RDF Source.</span>
</li>
<li property="td:input" resource="#TCIC2-I6-IC-URI"
typeof="tn:TestInput"><em property="dc:title"><IC URI></em>.
<span property="dc:description">The URI of a resource.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Indirect Container at <LDP-IC URI>.</li>
<li property="td:precondition">The LDP Indirect Container contains an RDF Source at <C URI>.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">The membership resource of the LDP-IC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-IC is <M URI>.</li>
<li property="td:precondition">The inserted content relation of the LDP-IC is <I URI>.</li>
<li property="td:precondition">The LDPC contains a triple whose property is ldp:insertedContentRelation and whose object is not ldp:MemberSubject.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCIC2-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC2-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC2-RQ2-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <R URI></div>
<span property="tn:usesInput" resource="#TCIC2-I2-R-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC2-RQ3-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <C URI></div>
<span property="tn:usesInput" resource="#TCIC2-I5-C-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCIC2-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCIC2-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCIC2-O2-Response-2-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 GET></em>.
<span property="dc:description">The response of the GET request in step 2.</span>
<span property="tn:fromStep" resource="#TCIC2-RQ2-GET-R-URI"> </span>
</li>
<li property="td:output" resource="#TCIC2-O3-Response-2-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCIC2-RQ3-GET-C-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCIC2-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET indirect container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-IC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-IC URI> ldp:isMemberOfRelation <M URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:insertedContentRelation <I URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container contains resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-IC URI> ldp:contains <C URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A4-Response-2-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O2-Response-2-GET">
Assert <Response 2 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A5-Response-2-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O2-Response-2-GET">
Assert <Response 2 GET> (<span property="dc:title">resource contains triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <R URI> <M URI> <C URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET contained resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC2-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC2-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">resource contains triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <C URI> <I URI> <IC URI></li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-IC3: POST an LDP-RS on an LDP-IC -->
<section resource="#TCIC3" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-IC3</span>.
<span property="dc:title">POST an LDP-RS on an LDP-IC</span>
</h3>
<p property="dc:description">Tests making a POST request of an LDP-RS on an LDP Indirect Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.2.1 LDP servers MUST support the HTTP GET Method for LDPRs.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.1 If the resource was created successfully, LDP servers MUST respond with status code 201 (Created) and the Location header set to the new resource’s URL.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.2 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, a containment triple MUST be added to the state of LDPC.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.4 LDP servers that successfully create a resource from a RDF representation in the request entity body MUST honor the client's requested interaction model(s). [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.5 LDP servers MUST accept a request entity body with a request header of Content-Type with value of text/turtle [turtle].</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.3.7 In RDF representations, LDP servers MUST interpret the null relative URI for the subject of triples in the LDPR representation in the request entity body as referring to the entity in the request body.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.3 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is the ldp:membershipResource, and whose object is the LDPC's membership-constant-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4 Each LDP Direct Container representation MUST contain exactly one triple whose subject is the LDPC URI, and whose predicate is either ldp:hasMemberRelation or ldp:isMemberOfRelation.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.1 LDP Direct Containers whose membership triple pattern is ( membership-constant-URI , membership-predicate , member-derived-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:hasMemberRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.4.2 LDP Direct Containers whose membership triple pattern is ( member-derived-URI , membership-predicate , membership-constant-URI ) MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is either ldp:isMemberOfRelation, and whose object is the URI of membership-predicate.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.2.1 When a successful HTTP POST request to an LDPC results in the creation of an LDPR, the LDPC MUST update its membership triples to reflect that addition, and the resulting membership triple MUST be consistent with any LDP-defined predicates it exposes.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.1 Each LDP Indirect Container MUST also be a conforming LDP Direct Container [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.2 LDP Indirect Containers MUST contain exactly one triple whose subject is the LDPC URI, whose predicate is ldp:insertedContentRelation, and whose object ICR describes how the member-derived-URI in the container's membership triples is chosen.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.2.1 LDPCs whose ldp:insertedContentRelation triple has an object other than ldp:MemberSubject and that create new resources MUST add a triple to the container whose subject is the container's URI, whose predicate is ldp:contains, and whose object is the newly created resource's URI (which will be different from the member-derived URI in this case). This ldp:contains triple can be the only link from the container to the newly created resource in certain cases.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCIC3-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-IC URI></em>.
<span property="dc:description">The URI of an LDP-IC.</span>
</li>
<li property="td:input" resource="#TCIC3-I2-LDPRS-REP"
typeof="tn:TestInput"><em property="dc:title"><LDP-RS representation></em>.
<span property="dc:description">The representation of the LDP-RS to be created.</span>
</li>
<li property="td:input" resource="#TCIC3-I3-R-URI"
typeof="tn:TestInput"><em property="dc:title"><R URI></em>.
<span property="dc:description">The URI of the membership resource.</span>
</li>
<li property="td:input" resource="#TCIC3-I4-M-URI"
typeof="tn:TestInput"><em property="dc:title"><M URI></em>.
<span property="dc:description">The URI of the membership property.</span>
</li>
<li property="td:input" resource="#TCIC2-I5-I-URI"
typeof="tn:TestInput"><em property="dc:title"><I URI></em>.
<span property="dc:description">The URI of a property.</span>
</li>
<li property="td:input" resource="#TCIC2-I6-IC-URI"
typeof="tn:TestInput"><em property="dc:title"><IC URI></em>.
<span property="dc:description">The URI of a resource.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Indirect Container at <LDP-IC URI>.</li>
<li property="td:precondition">The LDP-IC at <LDP-IC URI> allows POSTS of LDP-RSs.</li>
<li property="td:precondition">The LDP server does not desire to direct the user agent to retrieve a cacheable resource.</li>
<li property="td:precondition">The membership triple pattern used by the container is the one whose membership-constant-URI is the subject.</li>
<li property="td:precondition">The membership resource of the LDP-IC is at <R URI>.</li>
<li property="td:precondition">The membership predicate of the LDP-IC is <M URI>.</li>
<li property="td:precondition">The inserted content relation of the LDP-IC is <I URI>.</li>
<li property="td:precondition">The LDPC contains a triple whose property is ldp:insertedContentRelation and whose object is not ldp:MemberSubject.</li>
<li property="td:precondition">ldp:hasMemberRelation is the predicate used in all container representations.</li>
<li property="td:precondition"><LDP-RS representation> is in text/turtle.</li>
<li property="td:precondition"><LDP-RS representation> is a valid representation for a resource to be created in the LDP-IC.</li>
<li property="td:precondition"><LDP-RS representation> uses null relative URI as the entity in the request body.</li>
<li property="td:precondition"><LDP-RS representation> contains a triple with property <I URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCIC3-RQ1-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC3-RQ2-POST-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">POST <LDP-IC URI></div>
<ul>
<li>[entity-header].Content-type = text/turtle</li>
<li>[message-body] = <LDP-RS representation></li>
</ul>
<span property="tn:usesInput" resource="#TCIC3-I1-LDPC-URI"> </span>
<span property="tn:usesInput" resource="#TCIC3-I2-LDPRS-REP"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC3-RQ3-GET-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC3-I1-LDPC-URI"> </span>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC3-RQ4-GET-LOC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <Response 2 POST>.[response-header].Location</div>
</li>
<li inlist="" property="tn:testProcess" resource="#TCIC3-RQ5-GET-R-URI" typeof="tn:Step ht:Request">
<div property="dc:description">GET <R URI></div>
<span property="tn:usesInput" resource="#TCIC3-I3-R-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCIC3-O1-Response-1-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 GET></em>.
<span property="dc:description">The response of the GET request in step 1.</span>
<span property="tn:fromStep" resource="#TCIC3-RQ1-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCIC3-O2-Response-2-POST" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 2 POST></em>.
<span property="dc:description">The response of the POST request in step 2.</span>
<span property="tn:fromStep" resource="#TCIC3-RQ2-POST-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCIC3-O3-Response-3-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 3 GET></em>.
<span property="dc:description">The response of the GET request in step 3.</span>
<span property="tn:fromStep" resource="#TCIC3-RQ3-GET-LDPC-URI"> </span>
</li>
<li property="td:output" resource="#TCIC3-O4-Response-4-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 4 GET></em>.
<span property="dc:description">The response of the GET request in step 4.</span>
<span property="tn:fromStep" resource="#TCIC3-RQ4-GET-LOC-URI"> </span>
</li>
<li property="td:output" resource="#TCIC3-O5-Response-5-GET" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 5 GET></em>.
<span property="dc:description">The response of the GET request in step 5.</span>
<span property="tn:fromStep" resource="#TCIC3-RQ5-GET-R-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCIC3-A1-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A2-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">GET indirect container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-IC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-IC URI> ldp:isMemberOfRelation <M URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:insertedContentRelation <I URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A3-Response-1-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O1-Response-1-GET">
Assert <Response 1 GET> (<span property="dc:title">container does not contain resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] does not contain <LDP-IC URI> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A4-Response-2-POST" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O2-Response-2-POST">
Assert <Response 2 POST> (<span property="dc:title">POST correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 201</li>
<li>[response-header].Location exists</li>
<li>[response-header].Link includes ldp:Resource, ldp:IndirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A5-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A6-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">GET indirect container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
<li>[message-body] contains <LDP-IC URI> ldp:membershipResource <R URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:hasMemberRelation <M URI> and does not contain <LDP-IC URI> ldp:isMemberOfRelation <M URI></li>
<li>[message-body] contains <LDP-IC URI> ldp:insertedContentRelation <I URI></li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A7-Response-3-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O3-Response-3-GET">
Assert <Response 3 GET> (<span property="dc:title">container contains new resource</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <LDP-IC> ldp:contains <Response 2 POST>.[response-header].Location</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A8-Response-4-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O4-Response-4-GET">
Assert <Response 4 GET> (<span property="dc:title">GET new resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A9-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">GET membership resource correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC3-A10-Response-5-GET" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC3-O5-Response-5-GET">
Assert <Response 5 GET> (<span property="dc:title">resource has triple</span>):
<div property="dc:description">
<ul>
<li>[message-body] contains <R URI> <M URI> <IC URI></li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-IC4: HEAD on an LDP-IC -->
<section resource="#TCIC4" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-IC4</span>.
<span property="dc:title">HEAD on an LDP-IC</span>
</h3>
<p property="dc:description">Tests making a HEAD request on an LDP Indirect Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag header values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.6.1 LDP servers MUST support the HTTP HEAD method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link header with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.1 Each LDP Indirect Container MUST also be a conforming LDP Direct Container [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<p>
<em><a target="_blank" href="http://tools.ietf.org/html/rfc2616"
property="rdfs:seeAlso">Hypertext Transfer Protocol - HTTP/1.1</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">9.4 The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.</span>
<span property="rdfs:seeAlso" href="http://tools.ietf.org/html/rfc2616"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCIC4-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-IC URI></em>.
<span property="dc:description">The URI of an LDP-IC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Indirect Container at <LDP-IC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCIC4-RQ1-HEAD-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">HEAD <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC4-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCIC4-O1-Response-1-HEAD" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 HEAD></em>.
<span property="dc:description">The response of the HEAD request in step 1.</span>
<span property="tn:fromStep" resource="#TCIC4-RQ1-HEAD-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCIC4-A1-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC4-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[message-body] not exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC4-A2-Response-1-HEAD" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC4-O1-Response-1-HEAD">
Assert <Response 1 HEAD> (<span property="dc:title">HEAD container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
<!-- TC-IC5: OPTIONS on an LDP-IC -->
<section resource="#TCIC5" typeof="td:TestCase">
<h3>
<span property="rdfs:label">TC-IC5</span>.
<span property="dc:title">OPTIONS on an LDP-IC</span>
</h3>
<p property="dc:description">Tests making a OPTIONS request on an LDP Indirect Container.</p>
<p property="dc:contributor" resource="#FernandoSerena" typeof="foaf:Person">
<strong>Contributor: </strong>
<span property="rdfs:label">Fernando Serena</span>
</p>
<p property="td:reviewStatus" resource="td:unreviewed" typeof="td:ReviewStatus">
<strong>Status: </strong>Unreviewed
</p>
<h4>Related specification</h4>
<p>
<em><a target="_blank" href="http://www.w3.org/TR/ldp/"
property="rdfs:seeAlso">Linked Data Platform 1.0</a></em>:
</p>
<ul>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.3 LDP server responses MUST use entity tags (either weak or strong ones) as response ETag OPTIONSer values.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.1.4 LDP servers exposing LDPRs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI of http://www.w3.org/ns/ldp#Resource, and a link relation type of type(that is, rel='type') in all responses to requests made to the LDPR's HTTP Request-URI.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.1 LDP servers MUST support the HTTP OPTIONS method.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.2.8.2 LDP servers MUST indicate their support for HTTP Methods by responding to a HTTP OPTIONS request on the LDPR’s URL with the HTTP Method tokens in the HTTP response header Allow.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">4.3.1.1 Each LDP RDF Source MUST also be a conforming LDP Resource in section 4.2 Resource along the following restrictions in this section.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.1 Each Linked Data Platform Container MUST also be a conforming Linked Data Platform RDF Source.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.2.1.4 LDP servers exposing LDPCs MUST advertise their LDP support by exposing a HTTP Link OPTIONSer with a target URI matching the type of container [...] the server supports, and a link relation type of type (that is, rel='type') in all responses to requests made to the LDPC's HTTP Request-URI [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.4.1.1 Each LDP Direct Container MUST also be a conforming LDP Container in section 5.2 Container along the following restrictions.</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
<li property="td:specificationReference" typeof="tn:Excerpt">
<div>
<span property="tn:includesText">5.5.1.1 Each LDP Indirect Container MUST also be a conforming LDP Direct Container [...]</span>
<span property="rdfs:seeAlso" href="http://www.w3.org/TR/ldp/"></span>
</div>
</li>
</ul>
<h4>Input</h4>
<ul>
<li property="td:input" resource="#TCIC5-I1-LDPC-URI"
typeof="tn:TestInput"><em property="dc:title"><LDP-IC URI></em>.
<span property="dc:description">The URI of an LDP-IC.</span>
</li>
</ul>
<h4>Preconditions</h4>
<ul>
<li property="td:precondition">The LDP server contains an LDP Indirect Container at <LDP-IC URI>.</li>
</ul>
<h4>Process</h4>
<ol>
<li inlist="" property="tn:testProcess" resource="#TCIC5-RQ1-OPTIONS-LDPC-URI" typeof="tn:Step ht:Request">
<div property="dc:description">OPTIONS <LDP-IC URI></div>
<span property="tn:usesInput" resource="#TCIC5-I1-LDPC-URI"> </span>
</li>
</ol>
<h4>Output</h4>
<ul>
<li property="td:output" resource="#TCIC5-O1-Response-1-OPTIONS" typeof="tn:TestOutput ht:Response">
<em property="dc:title"><Response 1 OPTIONS></em>.
<span property="dc:description">The response of the OPTIONS request in step 1.</span>
<span property="tn:fromStep" resource="#TCIC5-RQ1-OPTIONS-LDPC-URI"> </span>
</li>
</ul>
<h4>Assertions</h4>
<ul>
<li property="tn:testAssertion" resource="#TCIC5-A1-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC5-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS correct</span>):
<div property="dc:description">
<ul>
<li>[Status-Line].Status-Code = 2xx</li>
<li>[response-header].ETag exists</li>
<li>[response-header].Link includes ldp:Resource;rel="type"</li>
<li>[entity-header].Allow exists</li>
</ul>
</div>
</div>
</li>
<li property="tn:testAssertion" resource="#TCIC5-A2-Response-1-OPTIONS" typeof="tn:TestAssertion">
<div property="tn:outputAsserted" resource="TCIC5-O1-Response-1-OPTIONS">
Assert <Response 1 OPTIONS> (<span property="dc:title">OPTIONS container correct</span>):
<div property="dc:description">
<ul>
<li>[response-header].Link includes ldp:IndirectContainer;rel="type"</li>
</ul>
</div>
</div>
</li>
</ul>
</section>
</section>
</section>
<section class="appendix">
<h2>
Change history
</h2>
<ul>
<li>2014-04-09 Updated according to Last Call Working Draft from 11 March 2014 (FS and RGC)</li>
<li>2013-08-27 Updated according to Last Call Working Draft from 30 July 2013 (RGC)</li>
<li>2013-06-03 Updated to use ReSpec (RGC)</li>
<li>2013-06-03 Implemented <a
href="http://lists.w3.org/Archives/Public/public-ldp-wg/2013May/0153.html">changes
suggested by Eric Prud'hommeaux</a> (RGC)
</li>
</ul>
</section>
<section class="appendix">
<h2>
Editor TODOs and notes
</h2>
<ul>
<li>Define the type of document: Working Draft, Note, etc.</li>
<li>Choose a URI for the test cases (this) document</li>
<li>Choose a namespace for the new vocabulary terms and for the
test cases</li>
<li>Include the RDF description of the test suite</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file
+ "Roger Menday"
],
status: "WD",
deliveredBy: [
"http://www.w3.org/2012/ldp/"
],
publisher: "W3C"
},
"LDP-TESTCASES": {
title: "Linked Data Platform Test Cases",
href: "http://w3c.github.io/ldp-testsuite/",
deliveredBy: [
"http://www.w3.org/2012/ldp/"
]
},
"LDP-TESTSUITE-COVERAGE": {
title: "Linked Data Platform Test Suite Coverage",
href: "http://w3c.github.io/ldp-testsuite/report/ldp-testsuite-coverage-report.html",
deliveredBy: [
"http://www.w3.org/2012/ldp/"
]
},
"LDP-IMPL": {
title: "Linked Data Platform Implementation Reports",
href: "https://dvcs.w3.org/hg/ldpwg/raw-file/default/tests/reports/ldp.html",
deliveredBy: [
"http://www.w3.org/2012/ldp/"
]
},
}
};
</script>
</head>
<body>
<section id='abstract'>
<p>The Linked Data Platform specification, informally LDP,
describes the use of HTTP for accessing, updating, creating and
deleting resources from servers that expose their resources as Linked
Data. This document describes the conditions that LDP servers must
satisfy in order to be conformant with the specification and presents
a common format for describing LDP test results.
These test cases both illustrate the features of the specification and
can be used for testing conformance. [[LINKED-DATA-PLATFORM]]</p>
</section>
<section id='sotd'>
<p>
<!--Empty. Nothing else to add.-->
</p>
</section>
<section>
<h2>
Introduction
</h2>
<p>
This document describes a test suite that can be used to evaluate the
conformance of LDP servers to the LDP specification
[[LINKED-DATA-PLATFORM]]. The document also presents the design
principles that guided the development of the test suite, a testing
process, and a common format for describing test results.
<br/> The purpose of the test cases is to illustrate the
specification features and to help in testing conformance. The
provided set of test cases is "incomplete" in the sense that passing
all the tests does not prove that a given system conforms to the LDP
specification; failing a test does, however, prove that the system
does not conform to the specification.
<br/> The presented format is intended to facilitate the use of
tests by LDP server developers, e.g., in a test harness, as well as
the extension of the test suite with new tests. Developers can check
the LDP Primer [[LDP-PRIMER]] for concrete examples of inputs and
expected outputs that can be used for testing.
</p>
</section>
<section>
<h2>
Design principles
</h2>
<section>
<h3>
Generic vs domain-specific servers
</h3>
<p>There will be two types of servers implementing the LDP
specification:</p>
<ul>
<li>Generic storage systems that allow interacting with their
resources by means of the LDP specification. These servers do not
impose any restriction on LDPRs.</li>
<li>Servers exposing their data using the LDP specification.
These servers impose restrictions on LDPRs since they have an
underlying business logic and data model.</li>
</ul>
<p>In order to cover both types of servers, there are some basic input
data and a way to provide
specific input data in the test suite. It is up to the evaluator to
define specific input data for a certain server. Evaluators must
include these input data along with the results when reporting the
results of a certain server.</p>
</section>
<section>
<h3>
Protocol evaluation vs data evaluation
</h3>
<p>The LDP specification includes restrictions on LDP servers at
the protocol level and at the data level. Currently, the restrictions
at the data level are minimal and servers are not forced to have a
certain behavior when processing LDPR representations. Therefore, the
test suite evaluates LDP servers at a protocol level; the only
exception is in the case of LDPCs, since they are required to include
an <code>rdf:type</code> statement in their representation.</p>
<p>It is out of the scope of the test suite to test LDP servers in
terms of the restrictions imposed by their underlying data models.</p>
</section>
<section>
<h3>
Test suite coverage
</h3>
<p>
This test suite covers those requirements present in the
LDP specification of any compliance level: MUST, SHOULD and MAY. This
set of absolute requirements identifies the core subset of the LDP
specification,
<dfn>LDP Core</dfn>
from now on, and any LDP server that satisfies these absolute
requirements will be an LDP Core conformant server.
</p>
<p>It is out of the scope of this test suite to test other levels
of conformance in terms of optional capabilities (e.g., paging, patch formats).</p>
<p>
Furthermore, the LDP specification [[LINKED-DATA-PLATFORM]] contains
a number of requirements that can not validated by automated means,
these are identified in a coverage report for the [[LINKED-DATA-PLATFORM]].
</p>
</section>
<section>
<h3>Separation of results and assertions</h3>
<p>Instead of defining expected results for tests, which will be
dependent on specific implementations, we have defined the assertions
to be made over test results. In order to successfully pass a test,
all of the assertions must be satisfied.</p>
<p>Separating test outputs and assertions has other benefits: it
makes simpler to report tool results and assertions can be made by a
third party.</p>
</section>
<section>
<h3>Traceability of test cases</h3>
<p>Any test case and its produced results and assertions should be
related to those documents that are relevant for it (e.g.,
specifications, uses cases, etc.).</p>
</section>
</section>
<section>
<h2>Testing process</h2>
<p>The LDP Test Cases are defined in a location, within Java source code. [[LDP-TESTCASES]]
Details about each individual test case, such as information about
whether it can be executed by automated means, manual, client only.
Also on the status of each test case, such as approved by the LDP
Working Group, awaiting approval or not yet implemented.[[LDP-TESTSUITE-COVERAGE]]</p>
<ol>
<li>The person or agent in charge of executing the test cases in
a specific LDP server will take the test case definitions and run
every test case on the LDP server. The execution of test
cases must produce a test execution report for the LDP server, in RDF
format, that contains for every test case: the specific inputs used
during its execution, the produced outputs, and the assertion of
whether the test case is passed. The test execution report must be
supplied as defined in the document on implementation reports. [[LDP-IMPL]]</li>
<li>A report generator software will take all the LDP server
execution reports and will generate an implementation report that
includes the results of all the LDP servers. [[LDP-IMPL]]</li>
</ol>
<p><object data="TestingProcess.svg" type="image/svg+xml">Your
browser does not support SVG.</object>
</p>
</section>
<section>
<h2>Describing testing artifacts in RDF</h2>
<section>
<h3>Namespaces used</h3>
<p>
The following vocabularies are reused for describing the testing
artifacts: DOAP (
<code>doap</code>
), Dublin Core (
<code>dc</code>
) [[DC11]], FOAF (
<code>foaf</code>
) [[FOAF]], HTTP Vocabulary in RDF (
<code>ht</code>
) [[HTTP-IN-RDF]], and W3C Test Metadata (
<code>td</code>
) [[TEST-METADATA]].
</p>
<p>
All the new required entities that are not covered by those
vocabularies have been defined under a new namespace (
<code>tn</code>
). Besides, the LDP test cases have been defined under their own
namespace (
<code>ldptc</code>
).
</p>
<p>Next we present the definition of these namespaces and of all
the namespaces used in the examples.</p>
<pre>cnt: <http://www.w3.org/2011/content#>
dc: <http://purl.org/dc/terms/>
doap: <http://usefulinc.com/ns/doap#>
earl: <http://www.w3.org/ns/earl#>
foaf: <http://xmlns.com/foaf/0.1/>
ht: <http://www.w3.org/2011/http#>
httph: <http://www.w3.org/2011/http-headers#>
ldptc: <http://www.w3.org/TR/ldp/TestCases#>
td: <http://www.w3.org/2006/03/test-description#>
tn: <http://ldp.example.org/NewTestDefinitions#></pre> </section> <!--
<section>
<h3><a id="TestSuiteDescription">Test suite description</a></h3>
<p><em>To be completed</em></p>
</section>
--> <section>
<h3>
Test case description
</h3>
<p>
A
<dfn id="dfn-test-case" title="test case">test case</dfn>
is defined as an instance of the
<code>td:TestCase</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>rdfs:label</code>. The human-readable label of the
test.</li>
<li><code>dc:title</code>. The name of the test.</li>
<li><code>dc:description</code>. The description of the test.</li>
<li><code>dc:contributor</code>. The person (<code>foaf:Person</code>)
contributing the test.</li>
<li><code>td:reviewStatus</code>. The status of the test;
possible status are: <code>td:unreviewed</code>, <code>td:approved</code>
or <code>td:rejected</code>.</li>
<li><code>rdfs:seeAlso</code>. A link to the specification it
refers to.</li>
<li><code>td:specificationReference</code>. An <a href="#dfn-excerpt">excerpt</a> (<code>tn:Excerpt</code>)
of the specification that is relevant to the test.</li>
<li><code>td:input</code>. An <a href="#dfn-test-input">input</a> (<code>tn:TestInput</code>)
used in the test.</li>
<li><code>td:precondition</code>. A precondition that must be
satisfied before running the test.</li>
<li><code>tn:output</code>. An <a href="#dfn-test-output">output</a>
(<code>tn:TestOutput</code>) to be produced by the test.</li>
<li><code>tn:testProcess</code>. The list of <a href="#dfn-step">steps</a>
(<code>tn:Step</code>) to be performed during the test.</li>
<li><code>tn:testAssertion</code>. An <a
href="#dfn-test-assertion">assertion</a> (<code>tn:TestAssertion</code>)
to be performed over the test output.</li>
</ul>
<p>
An
<dfn id="dfn-excerpt" title="excerpt">excerpt</dfn>
is defined as an instance of the
<code>tn:Excerpt </code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>rdfs:seeAlso</code>: The document where the excerpt is
included.</li>
<li><code>tn:includesText</code>. The excerpt from the document.</li>
</ul>
<p>
A
<dfn id="dfn-test-input" title="test input">test input</dfn>
is defined as an instance of the
<code>td:TestInput </code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test input.</li>
<li><code>dc:description</code>. The description of the test
input.</li>
</ul>
<p>
A
<dfn id="dfn-test-output" title="test output">test output</dfn>
is defined as an instance of the
<code>td:TestOutput</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test output.</li>
<li><code>dc:description</code>. The description of the test
output.</li>
<li><code>tn:fromStep</code>. The <a href="#dfn-step">step</a> in
the process in which the output is produced.</li>
</ul>
<p>
In the LDP test cases, test outputs are expected to be HTTP responses
(
<code>ht:Response</code>
).
</p>
<p>
A
<dfn id="dfn-step" title="step">step</dfn>
in the test process is defined as an instance of the
<code>td:Step</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:description</code>. The description of the step.</li>
<li><code>tn:usesInput</code>. A <a href="#dfn-test-input">test
input</a> used in the step.</li>
</ul>
<p>
In the LDP test cases, steps are expected to be HTTP requests (
<code>ht:Request</code>
).
</p>
<p>
A
<dfn id="dfn-test-assertion" title="test assertion">test
assertion</dfn>
is defined as an instance of the
<code>td:TestAssertion</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>dc:title</code>: The name of the test assertion.</li>
<li><code>dc:description</code>. The description of the test
assertion.</li>
<li><code>tn:outputAsserted</code>. An <a href="#dfn-test-output">output</a>
under assertion.</li>
</ul>
<p>The following example contains the description of one of the LDP
test cases.</p>
<pre class="example" id="test-case-example">:TCR1 a td:TestCase;
rdfs:label "TC-R1";
dc:title "GET on an LDPR";
dc:description "Tests making a GET request on an existing LDPR";
dc:contributor :RaulGarciaCastro;
td:reviewStatus td:unreviewed;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
td:specificationReference [
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.8 LDPR server responses MUST use entity tags (either weak or strong ones) as response ETag header values.".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.2.10 LDPR servers MUST advertise their LDP support by exposing a HTTP Link header with a target URI of http://www.w3.org/ns/ldp/Resource, and a link relation type of type (that is, rel="type") in all responses to requests made to the resource's HTTP Request-URI. [...]".
],
[
a tn:Excerpt;
rdfs:seeAlso <http://www.w3.org/TR/ldp/>;
tn:includesText "4.3.1 LDPR servers MUST support the HTTP GET Method for LDPRs.".
];
td:input :TCR1-I1-LDPR-URI;
td:precondition "The LDP server contains an LDPR at <LDPR URI>";
tn:output :TCR1-O1-Response-1-GET;
tn:testProcess (:TCR1-RQ1-GET-LDPR-URI);
tn:testAssertion :TCR1-A1-Response-1-GET.
:RaulGarciaCastro a foaf:Person;
rdfs:label "Raúl García-Castro";
owl:sameAs <http://www.garcia-castro.com/#me>.
:TCR1-I1-LDPR-URI a tn:TestInput;
dc:title "<LDPR URI>";
dc:description "The URI of an LDPR".
:TCR1-O1-Response-1-GET a tn:TestOutput;
a ht:Response;
tn:fromStep :TCR1-RQ1-GET-LDPR-URI;
dc:title "<Response 1 GET>";
dc:description "The response of the GET request in step 1".
:TCR1-RQ1-GET-LDPR-URI a tn:Step;
a ht:Request;
dc:description "GET <LDPR URI>";
tn:usesInput :TCR1-I1-LDPR-URI.
:TCR1-A1-Response-1-GET a tn:TestAssertion;
tn:outputAsserted :TCR1-O1-Response-1-GET;
dc:title "GET correct";
dc:description """[Status-Line].Status-Code = 2xx
[response-header].ETag exists
[response-header].Link includes ldp:Resource; rel="type"""".
</pre> </section> <section>
<h3>
Execution report description
</h3>
<p>
A
<dfn id="dfn-test-execution" title="test execution">test
execution</dfn>
is defined as an instance of the
<code>tn:TestExecution</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:testExecuted</code>. The <a href="#dfn-test-case">test
case</a> (<code>td:TestCase</code>) used in the execution.</li>
<li><code>tn:subjectTested</code>. The subject (<code>doap:Project</code>)
tested.</li>
<li><code>dc:date</code>. The date when the test was executed.</li>
<li><code>tn:inputUsed</code>. The <a
href="#dfn-test-input-value">input value</a> (<code>tn:TestInputValue</code>)
used in the execution.</li>
<li><code>tn:outputProduced</code>. The <a
href="#dfn-test-output-value">output value</a> (<code>tn:TestOutputValue</code>)
produced in the execution.</li>
</ul>
<p>
A
<dfn id="dfn-test-input-value" title="test input value">test
input value</dfn>
is defined as an instance of the
<code>tn:TestInputValue</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:relatedInput</code>. The <a href="#dfn-test-input">input</a>
in the test definition (<code>tn:TestInput</code>) for which the
value is defined.</li>
<li><code>tn:inputValue</code>. The specific input defined for
the execution.</li>
</ul>
<p>
A
<dfn id="dfn-test-output-value" title="test output value">test
output value</dfn>
is defined as an instance of the
<code>tn:TestOutputValue</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>tn:relatedOutput</code>. The <a href="#dfn-test-output">output</a>
in the test definition (<code>tn:TestOutput</code>) for which the
value is defined.</li>
<li><code>tn:outputValue</code>. The specific output defined for
the execution.</li>
</ul>
<p>
In the LDP test cases, test output values are expected to be HTTP
responses (
<code>ht:Response</code>
).
</p>
<p>The following example contains the description of one test
execution.</p>
<pre class="example" id="execution-report-example">:TCR1-Execution a tn:TestExecution;
tn:testExecuted ldptc:TCR1;
tn:subjectTested :SomeServer;
dc:date "2013-03-30T09:30:10";
tn:inputUsed [
a tn:TestInputValue ;
tn:relatedInput :TCR1-I1-LDPR-URI ;
tn:inputValue <http://www.example.org/MyResource> .
];
tn:outputProduced [
a tn:TestOutputValue ;
tn:relatedOutput :TCR1-O1-Response-1-GET ;
tn:outputValue :TCR1-Exec-Response-1-GET .
].
:SomeServer a doap:Project;
doap:name "Sample server".
:TCR1-Exec-Response-1-GET a ht:Response;
ht:httpVersion "1.1";
dc:date "2013-03-30T09:30:10";
ht:sc <http://www.w3.org/2011/http-statusCodes#OK>;
ht:statusCodeValue "200";
ht:reasonPhrase "OK";
ht:headers (
[
a ht:ResponseHeader;
ht:hdrName httph:etag;
ht:fieldName "ETag";
ht:fieldValue "hd73hck43".
]
[
a ht:EntityHeader;
ht:hdrName httph:content-type;
ht:fieldName "Content-Type";
ht:fieldValue "text/turtle; charset=utf-8".
]
);
ht:body [
a cnt:ContentAsText ;
cnt:chars """
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix dc: <http://purl.org/dc/terms/>.
@prefix ldp: <http://www.w3.org/ns/ldp#>.
<http://example.org/MyResource>
a ldp:Resource;
dc:title "My LDP resource".
""";
cnt:characterEncoding "UTF-8".
].
</pre> </section> <section>
<h3>
Test case assertion description
</h3>
<p>
An
<dfn id="dfn-assertion" title="assertion">assertion</dfn>
is defined as an instance of the
<code>earl:Assertion</code>
class and it can be further described using the following properties:
</p>
<ul>
<li><code>earl:subject</code>.The subject (<code>doap:Project</code>)
asserted.</li>
<li><code>earl:test</code>. The <a href="#dfn-test-case">test
case</a> (<code>td:TestCase</code>) to which the assertion refers to.</li>
<li><code>tn:fromTestExecution</code>. The <a
href="#dfn-test-execution">test execution</a> (<code>td:TestExecution</code>)
used in the assertion.</li>
<li><code>dc:date</code>. The date when the assertion was
performed.</li>
<li><code>earl:assertedBy</code>. The validator (<code>doap:Project</code>)
that makes the assertion.</li>
<li><code>
<code>earl:mode</code>
.
</code> The execution mode of the validator. In this case it will always be
<code>earl:automatic</code>.</li>
<li><code>earl:result</code>. The outcome value (<code>earl:OutcomeValue</code>)
of the assertion.</li>
</ul>
<p>The following example contains the description of one test
assertion.</p>
<pre class="example" id="test-assertion-example">:TCR1-Assertion-SomeServer a earl:Assertion;
earl:subject sr:SomeServer;
earl:test ldptc:TCR1;
tn:fromTestExecution sr:TCR1-Execution;
dc:date "2013-03-30T09:30:10";
earl:assertedBy :Validator;
earl:mode: earl:automatic;
earl:result [
a earl:OutcomeValue ;
earl:outcome earl:passed .
].
:Validator a doap:Project;
doap:name "Some validator".</pre> </section> </section>
</section>
</section>
<section class="appendix">
<h2>Change history</h2>
<ul>
<li>2014-06-22 Brought inline with separate automated testsuite hosted on GitHub (SS)</li>
<li>2014-04-09 Updated according to Last Call Working Draft from 11 March 2014 (FS and RGC)</li>
<li>2013-08-27 Updated according to Last Call Working Draft from 30 July 2013 (RGC)</li>
<li>2013-06-03 Updated to use ReSpec (RGC)</li>
<li>2013-06-03 Implemented <a
href="http://lists.w3.org/Archives/Public/public-ldp-wg/2013May/0153.html">changes
suggested by Eric Prud'hommeaux</a> (RGC)
</li>
</ul>
</section>
<section class="appendix">
<h2>Editor TODOs and notes</h2>
<ul>
<li>Define the type of document: Working Draft, Note, etc.</li>
<li>Choose a URI for the test cases (this) document</li>
<li>Choose a namespace for the new vocabulary terms and for the
test cases</li>
<li>Include the RDF description of the test suite</li>
</ul>
</section>
</body>
</html>
\ No newline at end of file