diff options
| author | franck cuny <franck@lumberjaph.net> | 2010-07-16 11:19:15 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2010-07-16 11:19:15 +0200 |
| commit | faf6949033a021bffab3c91a04665efef4378b28 (patch) | |
| tree | 48f04f0f373f3c2067216d76eaeb9f0e4badf339 /t/02-graph.t | |
| download | graph-gexf-faf6949033a021bffab3c91a04665efef4378b28.tar.gz | |
basic gexf generation
Diffstat (limited to 't/02-graph.t')
| -rw-r--r-- | t/02-graph.t | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/02-graph.t b/t/02-graph.t new file mode 100644 index 0000000..a81f889 --- /dev/null +++ b/t/02-graph.t @@ -0,0 +1,18 @@ +use strict; +use warnings; + +use Test::More; + +use Graph::GEXF; + +ok my $graph = Graph::GEXF->new(), 'graph created'; + +$graph->add_node_attribute('url', 'anyURI'); +$graph->add_node_attribute('lf', 'integer'); + +is $graph->total_attributes, 2, 'got 2 attributes'; + +ok my $attr = $graph->get_attribute('url'), 'fetch first attribute'; +is $attr->{title}, 'url', 'first attribute is url'; + +done_testing; |
