json' );
isnt( $json, '' );
isnt( $json, undef );
eval {
($type, $json ) = RDF::Server::Formatter::JSON -> category( );
};
is( $@, '', 'category ran' );
is( $type, 'application/json' );
isnt( $json,
son' );
isnt( $json, '' );
isnt( $json, undef );
eval {
($type, $json ) = RDF::Server::Formatter::JSON -> workspace( );
};
is( $@, '', 'workspace ran' );
is( $type, 'application/json' );
isnt( $json
, '' );
isnt( $json, undef );
eval {
($type, $json ) = RDF::Server::Formatter::JSON -> service( );
};
is( $@, '', 'service ran' );
is( $type, 'application/json' );
isnt( $json, '' );
isnt( $json, un
0) unless $response -> is_success;
is( $response -> code, 201, 'HTTP CREATED status' );
isnt( $response -> header('Location'), '', 'Location returned' );
if( $has_xml_xpath ) {
isnt( scalar(@{ [ $doc -> findnodes($path) ] }), $counts -> {$path}, "count($path) != $counts->{$path}");
}
foreach my $path ( sort keys %$paths ) {
isnt( $doc ->
ion -> throw(
status => 401,
content => 'Access forbidden!'
);
};
my $e = $@;
isnt( $e, undef, 'we have an exception');
isa_ok( $e, 'RDF::Server::Exception' );
is( $e -> status,
content, 'Access forbidden!' );
eval {
throw RDF::Server::Exception::Forbidden;
};
$e = $@;
isnt( $e, undef, 'we have an exception');
isa_ok( $e, 'RDF::Server::Exception::Forbidden' );
is( $e
nless not not eval "require JSON::Any";
$empty_json = $server -> fetch( "/foo/.json" );
isnt( $empty_json, '' );
is( $empty_json, '{}' );
}
$loaded_doc = $server -> update( "/foo/"
less not not eval "require JSON::Any";
$loaded_json = $server -> fetch( "/foo/.json" );
isnt( $loaded_json, $empty_json );
}
like( $loaded_doc, qr{Albuquerque International Airport}, 'Docum
tic::Atom';
render xml => 'Atom';
eval {
render foo => 'Foo';
};
main::isnt( $@, '', 'Bad formatter package causes an error' );
};
$e = $@;
is( $e, '', 'No error creating t
handler => [ collaboration => {
title => 'title'
}]
);
};
$e = $@;
isnt( $e, '' );
like( $e, qr{^Unknown Atom \(.*?\) document type: collaboration}, "Got the right kind
', 2 unless $response -> is_success;
is( $response -> code, 201, 'HTTP CREATED status' );
isnt( $response -> header('Location'), '', 'Location returned' );
$returned_content = $response ->
id => "foo-id",
link => '/some/url',
entries => $model -> resources
);
# diag $r -> fetch;
# diag $xml;
isnt( $xml, '' );
is($type, 'application/atom+xml' );
}
', 1 unless $response -> is_success;
is( $response -> code, 201, 'HTTP CREATED status' );
isnt( $response -> header('Location'), '', 'Location returned' );
}
$returned_content = $server -> up
('t/data/AirportCodes.daml') -> slurp( chomp => 1 )));
my $new_doc = $server -> fetch('/foo/');
isnt( $new_doc, $empty_doc, "Loaded doc isn't empty" );
is($new_doc, $loaded_doc, "Loaded doc and new
= 0;
my $bad_render_test = <<'eoCODE';
eval {
render foo => 'Foo';
};
main::isnt( $@, '', 'Bad formatter package causes an error' );
eoCODE
foreach my $protocol (@protocols) {