summary refs log tree commit diff
path: root/t/03-node.t
blob: ccd79fe415ee7ee2c000ffdecd48eec13e01867a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;