use strict;

my $source;


my $source_text;
$source = 't/presenter_data.xml';

open FILE, "<$source";
$source_text = join '', <FILE>;
close FILE;


use ACIS::Data::DumpXML qw( dump_xml );
use ACIS::Data::DumpXML::Parser;

use Carp::Assert;

#print "1..5\n";
use ARDB::Test;


print "initial xml: $source_text\n";



#my $struct =  ACIS::Data::DumpXML::Parser -> new -> parse ( $source_text );
my $struct =  ACIS::Data::DumpXML::Parser -> new -> parsefile ( $source );


use Data::Dumper;

print Dumper $struct;

###  here are the main tests:

test( ref $struct );
test( $struct -> {request} );
test( $struct -> {response} );
test( $struct -> {system} );
test( $struct -> {system}{config} );



###  and the last test

my $xml = dump_xml( $struct );

# print "after second dump: $xml\n";

test( $xml eq $source_text );



