diff options
Diffstat (limited to 't/03-node.t')
| -rw-r--r-- | t/03-node.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/03-node.t b/t/03-node.t new file mode 100644 index 0000000..ccd79fe --- /dev/null +++ b/t/03-node.t @@ -0,0 +1,19 @@ +use strict; +use warnings; +use Test::More; + +use Graph::GEXF::Node; + +ok my $node = Graph::GEXF::Node->new(id =>0), 'node created'; + +ok !$node->attribute('url', 'http://linkfluence.net'), 'can\'t add attribute, not attributes defined'; + +ok $node = Graph::GEXF::Node->new( + id => 0, + attributes => {url => {title => 'url', type => 'anyURI'}} + ), + 'node created'; + +ok $node->attribute('url', 'http://linkfluence.net'), 'add attribute url to node'; + +done_testing; |
