use AMF::Tests;   ### -*- mode: perl -*-

eval " use AMF::Noun; ";
test not $@;

my $n;

$n = AMF::Noun -> new;

test $n;


$n = AMF::Noun -> new( TYPE => 'AMF-text' );

test $n;
test $n -> type;
test $n -> type eq 'AMF-text';

# test 0;

my $p = AMF::Noun -> new( TYPE => 'person' );
$p -> adjective( "name", {},  "Grace Flesherman" );
test $p;

$n -> adjective( "title", { 'xml:lang' => 'en' }, "The Flipping Manual" );
$n -> adjective( "contactpage", {}, "http://xxx.sss.eee.rr/" );
$n -> verb( "hasauthor", {}, $p );

test $n -> get_value( 'title' ) eq 'The Flipping Manual';
test $n -> get_value( 'hasauthor/name' ) eq 'Grace Flesherman';

test $n -> get_value( 'title/@xml:lang' ) eq 'en';


