check response with parametars
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 28 Oct 2007 12:21:53 +0000 (12:21 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 28 Oct 2007 12:21:53 +0000 (12:21 +0000)
git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@167 836a5e1a-633d-0410-964b-294494ad4392

t/20-response.t
t/response/GetParameterNames.xml

index 2e69fdc..c3ec6f2 100755 (executable)
@@ -23,7 +23,11 @@ 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,
+       };
+
+       ok( my $xml = $response->$command( $state, @_ ), "generate response $command" . dump(@_) );
 
        my $file = "$abs_path/response/$command.xml";
 
@@ -40,5 +44,5 @@ sub check_response {
 check_response( 'InformResponse' );
 check_response( 'GetRPCMethods' );
 check_response( 'Reboot' );
-check_response( 'GetParameterNames' );
+check_response( 'GetParameterNames', 'InternetGatewayDevice.DeviceInfo.SerialNumber', 0 );
 check_response( 'GetParameterValues' );
index 90cd0eb..3f7165c 100644 (file)
@@ -7,7 +7,7 @@
   </soap:Header>
   <soap:Body>
     <cwmp:GetParameterNames>
-      <cwmp:ParameterPath></cwmp:ParameterPath>
+      <cwmp:ParameterPath>InternetGatewayDevice.DeviceInfo.SerialNumber</cwmp:ParameterPath>
       <cwmp:NextLevel>0</cwmp:NextLevel>
     </cwmp:GetParameterNames>
   </soap:Body>