forked from kasei/attean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ef5aea
commit 02ad522
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 3; | ||
|
||
use v5.14; | ||
use Attean; | ||
|
||
my $ns = {foaf => 'http://xmlns.com/foaf/0.1/'}; | ||
my $map = URI::NamespaceMap->new($ns); | ||
|
||
my $value = Attean::ValueExpression->new(value => Attean::IRI->new('http://xmlns.com/foaf/0.1/person')); | ||
|
||
is ($value->as_sparql(namespaces => $map), <<IRI, 'as_sparql with URI::NamespaceMap object passed as namespace value'); | ||
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | ||
foaf:person | ||
IRI | ||
|
||
is ($value->as_sparql(namespaces => $map), <<IRI, 'as_sparql with HASH ref passed as namespace value'); | ||
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | ||
foaf:person | ||
IRI | ||
|
||
is ($value->as_sparql(),<<IRI, 'as_sparql without arguments'); | ||
<http://xmlns.com/foaf/0.1/person> | ||
IRI | ||
|