summaryrefslogtreecommitdiff
path: root/t/03-node.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-07-16 11:19:15 +0200
committerfranck cuny <franck@lumberjaph.net>2010-07-16 11:19:15 +0200
commitfaf6949033a021bffab3c91a04665efef4378b28 (patch)
tree48f04f0f373f3c2067216d76eaeb9f0e4badf339 /t/03-node.t
downloadgraph-gexf-faf6949033a021bffab3c91a04665efef4378b28.tar.gz
basic gexf generation
Diffstat (limited to 't/03-node.t')
-rw-r--r--t/03-node.t19
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;