implemented correct GetParameterValues which unrolls ParameterNames into xsd:strings
[perl-cwmp.git] / t / 20-response.t
index 2e69fdc..df885b8 100755 (executable)
@@ -23,7 +23,12 @@ isa_ok( $response, 'CWMP::Response' );
 sub check_response {
        my $command = shift || die "no command?";
 
-       ok( my $xml = $response->$command({ ID => 42 }), "generate response for $command" );
+       my $state = {
+               ID => 42,
+       };
+
+       diag "check_response $command",dump( 'state', @_ ) if $debug;
+       ok( my $xml = $response->$command( $state, @_ ), "generate response $command" . dump(@_) );
 
        my $file = "$abs_path/response/$command.xml";
 
@@ -40,5 +45,5 @@ sub check_response {
 check_response( 'InformResponse' );
 check_response( 'GetRPCMethods' );
 check_response( 'Reboot' );
-check_response( 'GetParameterNames' );
-check_response( 'GetParameterValues' );
+check_response( 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.SerialNumber' );
+check_response( 'GetParameterValues', 'InternetGatewayDevice.DeviceInfo.SerialNumber', 'InternetGatewayDevice.DeviceInfo.VendorConfigFile.' );