diff --git a/pom.xml b/pom.xml index 8e7aa5bf3c99..3519ce9f0cbb 100644 --- a/pom.xml +++ b/pom.xml @@ -473,7 +473,7 @@ samples/server/petstore/spring-mvc samples/client/petstore/ruby samples/server/petstore/jaxrs - samples/client/petstore/objc/SwaggerClientTests + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/mono-nunit.sh b/samples/client/petstore/csharp/SwaggerClientTest/mono-nunit.sh new file mode 100755 index 000000000000..c14e76dad051 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/mono-nunit.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +wget -nc https://nuget.org/nuget.exe; +mozroots --import --sync + +# remove bin/Debug/SwaggerClientTest.dll +rm bin/Debug/SwaggerClientTest.dll 2> /dev/null + +# install NUnit runners via NuGet +mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner + +# build the solution and run the unit test +xbuild SwaggerClientTest.sln && \ +mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe bin/Debug/SwaggerClientTest.dll + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/pom.xml b/samples/client/petstore/csharp/SwaggerClientTest/pom.xml new file mode 100644 index 000000000000..46304c216210 --- /dev/null +++ b/samples/client/petstore/csharp/SwaggerClientTest/pom.xml @@ -0,0 +1,56 @@ + + 4.0.0 + com.wordnik + CsharpPetstoreClientTests + pom + 1.0-SNAPSHOT + C# Swagger Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + + mono-test + integration-test + + exec + + + mono-nunit.sh + + + + + + +