openapi-generator/samples/client/petstore/perl/t/StoreApiTest.t
2017-01-21 19:12:51 +08:00

65 lines
1.3 KiB
Perl

=begin comment
Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
=end comment
=cut
#
# NOTE: This class is auto generated by Swagger Codegen
# Please update the test cases below to test the API endpoints.
# Ref: https://github.com/swagger-api/swagger-codegen
#
use Test::More tests => 1; #TODO update number of test cases
use Test::Exception;
use lib 'lib';
use strict;
use warnings;
use_ok('WWW::SwaggerClient::StoreApi');
my $api = WWW::SwaggerClient::StoreApi->new();
isa_ok($api, 'WWW::SwaggerClient::StoreApi');
#
# delete_order test
#
{
my $order_id = undef; # replace NULL with a proper value
my $result = $api->delete_order(order_id => $order_id);
}
#
# get_inventory test
#
{
my $result = $api->get_inventory();
}
#
# get_order_by_id test
#
{
my $order_id = undef; # replace NULL with a proper value
my $result = $api->get_order_by_id(order_id => $order_id);
}
#
# place_order test
#
{
my $body = undef; # replace NULL with a proper value
my $result = $api->place_order(body => $body);
}
1;