#!/usr/bin/perl -X require '/var/www/MyPoint/Trunk/API/UnitTests/UnitTest_Globals.pl'; $HTTP = $ARGV[0]; $DEBUG = $ARGV[1]; ##Test 1 $xml = "<\?xml version=\"1.0\"\?>"; $xml .=" ##API_CALL## ####XML_TO_SEND#### "; $receivedHash = DoHTTPCall($xml); ####RETURN_CHECKS#### # if($receivedHash->{status} ne "true") { print "Call Returned Failed \@ Line(".__LINE__.")\n"; exit(-1); } # if(ref($receivedHash->{product}) ne "ARRAY") { print "Call Didnt Return List of Products \@ Line(".__LINE__.")\n"; exit(-2); } # $loop=0; # do # { # if($receivedHash->{product}->[$loop]->{product_id} eq "") { print "Call Didnt return a product id \@ Line(".__LINE__.")\n"; exit(-1); } # if($receivedHash->{product}->[$loop]->{product_name} eq "") { print "Call Didnt return a product name \@ Line(".__LINE__.")\n"; exit(-1); } # }while(defined($receivedHash->{product}->[++$loop]->{product_id})); exit(0);