Mercurial > pub > Impl
view _test/Test/DOM/Node.pm @ 16:75d55f4ee263
Окончательная концепция описания схем и построения DOM документов
author | Sergey |
---|---|
date | Tue, 08 Sep 2009 17:29:07 +0400 |
parents | 65a7bb156fb7 |
children | 818c74b038ae |
line wrap: on
line source
package Test::DOM::Node; use strict; use warnings; use base qw(IMPL::Test::Unit); use IMPL::Test qw(test shared failed); use IMPL::Class::Property; require IMPL::DOM::Node; __PACKAGE__->PassThroughArgs; BEGIN { shared public property Root => prop_all; } test Create => sub { my ($this) = @_; $this->Root(new IMPL::DOM::Node(nodeName => 'Root')) or failed "Failed to create a node"; }; test AppendNode => sub { my ($this) = @_; my $child = $this->Root->appendNode(new IMPL::DOM::Node(nodeName => 'Child')) or failed "Failed to append a child node"; my $firstChild = $this->Root->firstChild; failed "firstChild returned incorrect results" unless $firstChild == $child; }; 1;