Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perl] Update _test.mustache templates to use done_testing #17649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -29,3 +29,5 @@ isa_ok($api, '{{moduleName}}::{{classname}}');

{{/operation}}
{{/operations}}

done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -23,3 +23,5 @@ use_ok('{{moduleName}}::Object::{{classname}}');

{{/model}}
{{/models}}

done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AdditionalPropertiesClass');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AdditionalPropertiesClass');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AllOfWithSingleRefTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::AllOfWithSingleRef');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::AllOfWithSingleRef');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AnimalTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Animal');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Animal');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/AnotherFakeApiTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -36,3 +36,5 @@ isa_ok($api, 'WWW::OpenAPIClient::AnotherFakeApi');
#my $call_123_test_special_tags_client = undef; # replace NULL with a proper value
#my $call_123_test_special_tags_result = $api->call_123_test_special_tags(client => $call_123_test_special_tags_client);


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ApiResponseTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ApiResponse');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ApiResponse');


done_testing();
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayOfNumberOnly');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfNumberOnly');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ArrayTestTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ArrayTest');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayTest');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CapitalizationTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Capitalization');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Capitalization');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CatTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Cat');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Cat');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/CategoryTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Category');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Category');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ChildWithNullableTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ChildWithNullable');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ChildWithNullable');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ClassModelTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::ClassModel');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::ClassModel');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/ClientTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Client');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Client');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DefaultApiTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the API endpoints.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 1; #TODO update number of test cases
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -35,3 +35,5 @@ isa_ok($api, 'WWW::OpenAPIClient::DefaultApi');
# uncomment below and update the test
#my $foo_get_result = $api->foo_get();


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DeprecatedModelTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::DeprecatedModel');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::DeprecatedModel');


done_testing();
34 changes: 0 additions & 34 deletions samples/client/petstore/perl/t/DeprecatedObjectTest.t

This file was deleted.

4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/DogTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::Dog');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::Dog');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumArraysTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumArrays');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumArrays');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumClassTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumClass');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumClass');


done_testing();
4 changes: 3 additions & 1 deletion samples/client/petstore/perl/t/EnumTestTest.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Generated by: https://openapi-generator.tech
# Please update the test cases below to test the model.
# Ref: https://openapi-generator.tech
#
use Test::More tests => 2;
use Test::More;
use Test::Exception;

use lib 'lib';
Expand All @@ -32,3 +32,5 @@ use_ok('WWW::OpenAPIClient::Object::EnumTest');
#
#isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumTest');


done_testing();