summaryrefslogblamecommitdiff
path: root/t/02-graph.t
blob: a81f88971dbca5bb1a1f41ca0bdca33ee214f2dc (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;