@prefix test: <http://example.org/test-fixtures#> .
@prefix deps: <http://ontologi.es/doap-deps#>.
@prefix dc:   <http://purl.org/dc/terms/> .
@prefix httph:<http://www.w3.org/2007/ont/httph#> .
@prefix http: <http://www.w3.org/2007/ont/http#> .


<#test-list> a test:FixtureTable ;
    test:fixtures ( <#public-writeread-unauthn-alt> <#public-cors-origin-set> ).


<#public-writeread-unauthn-alt> a test:Test ;
    dc:description "More elaborate HTTP vocab for PUT then GET test"@en ;
    test:handler "Internal::Fixture::HTTPList"^^deps:CpanId ;
    dc:identifier "http_req_res_list_unauthenticated" ;
    test:params [
        test:requests ( <#public-writeread-unauthn-alt-put-req> <#public-writeread-unauthn-alt-get-req> ) ;
        test:responses ( <#public-writeread-unauthn-alt-put-res> <#public-writeread-unauthn-alt-get-res> ) 
                ] .
                

<#public-writeread-unauthn-alt-put-req> a http:RequestMessage ;
            http:method "PUT" ;
            httph:content_type "text/turtle" ;
            http:content "</public/foobar.ttl#dahut> a <http://example.org/Cryptid> ." ;
            http:requestURI </public/foobar.ttl> .
          
<#public-writeread-unauthn-alt-put-res> a http:ResponseMessage ;
    http:status 201 .

<#public-writeread-unauthn-alt-get-req> a http:RequestMessage ;
    http:method "GET" ;
    http:requestURI </public/foobar.ttl> .
            
<#public-writeread-unauthn-alt-get-res> a http:ResponseMessage ;
    httph:content_type "text/turtle" .
            


<#public-cors-origin-set> a test:Test ;
    dc:description "Testing CORS header when Origin is supplied by client"@en ;
    test:handler "Internal::Fixture::HTTPList"^^deps:CpanId ;
    dc:identifier "http_req_res_list_unauthenticated" ;
    test:params [
        test:requests ( <#public-cors-origin-set-req> ) ;
        test:responses ( <#public-cors-origin-set-res> ) 
                ] .
                
<#public-cors-origin-set-req> a http:RequestMessage ;
                    http:method "GET" ;
                    httph:origin <https://app.example> ;
                    http:requestURI </public/verypublic/foobar.ttl> .
            
<#public-cors-origin-set-res> a http:ResponseMessage ;
                    http:status 200 ;    
                    httph:access_control_allow_origin <https://app.example> ;
                    httph:content_type "text/turtle" .