diff --git a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache index fc3825491d2..f6cbcfc61c1 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/ApiClient.mustache @@ -41,11 +41,38 @@ namespace {{packageName}}.Client { public Object CallApi(String path, RestSharp.Method method, Dictionary queryParams, String postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, String[] authSettings) { - var response = Task.Run(async () => { - var resp = await CallApiAsync(path, method, queryParams, postBody, headerParams, formParams, fileParams, authSettings); - return resp; - }); - return response.Result; + + var request = new RestRequest(path, method); + + UpdateParamsForAuth(queryParams, headerParams, authSettings); + + // add default header, if any + foreach(KeyValuePair defaultHeader in this.DefaultHeaderMap) + request.AddHeader(defaultHeader.Key, defaultHeader.Value); + + // add header parameter, if any + foreach(KeyValuePair param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(KeyValuePair param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(KeyValuePair param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(KeyValuePair param in fileParams) + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + + + if (postBody != null) { + request.AddParameter("application/json", postBody, ParameterType.RequestBody); // http body (model) parameter + } + + return (Object)RestClient.Execute(request); + } public async Task CallApiAsync(String path, RestSharp.Method method, Dictionary queryParams, String postBody, @@ -120,9 +147,9 @@ namespace {{packageName}}.Client { public FileParameter ParameterToFile(string name, Stream stream) { if (stream is FileStream) { - return FileParameter.Create(name, StreamToByteArray(stream), ((FileStream)stream).Name); + return FileParameter.Create(name, StreamToByteArray(stream), Path.GetFileName(((FileStream)stream).Name)); } else { - return FileParameter.Create(name, StreamToByteArray(stream), "temp_name_here"); + return FileParameter.Create(name, StreamToByteArray(stream), "no_file_name_provided"); } } diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache index 94795879873..78d2a2598a9 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache @@ -117,6 +117,8 @@ namespace {{packageName}}.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling {{nickname}}: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling {{nickname}}: " + response.ErrorMessage, response.ErrorMessage); } {{#returnType}}return ({{{returnType}}}) ApiClient.Deserialize(response.Content, typeof({{{returnType}}}), response.Headers);{{/returnType}}{{^returnType}}return;{{/returnType}} diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs index 9b6de5c74b3..685d575a67b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs @@ -217,6 +217,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling UpdatePet: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -291,6 +293,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling AddPet: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling AddPet: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -365,6 +369,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByStatus: " + response.ErrorMessage, response.ErrorMessage); } return (List) ApiClient.Deserialize(response.Content, typeof(List), response.Headers); @@ -438,6 +444,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling FindPetsByTags: " + response.ErrorMessage, response.ErrorMessage); } return (List) ApiClient.Deserialize(response.Content, typeof(List), response.Headers); @@ -514,6 +522,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling GetPetById: " + response.ErrorMessage, response.ErrorMessage); } return (Pet) ApiClient.Deserialize(response.Content, typeof(Pet), response.Headers); @@ -596,6 +606,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling UpdatePetWithForm: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -681,6 +693,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling DeletePet: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling DeletePet: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -766,6 +780,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling UploadFile: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling UploadFile: " + response.ErrorMessage, response.ErrorMessage); } return; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs index 032918afcd3..6c337870706 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/StoreApi.cs @@ -147,6 +147,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage); } return (Dictionary) ApiClient.Deserialize(response.Content, typeof(Dictionary), response.Headers); @@ -218,6 +220,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling PlaceOrder: " + response.ErrorMessage, response.ErrorMessage); } return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers); @@ -294,6 +298,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling GetOrderById: " + response.ErrorMessage, response.ErrorMessage); } return (Order) ApiClient.Deserialize(response.Content, typeof(Order), response.Headers); @@ -372,6 +378,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling DeleteOrder: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling DeleteOrder: " + response.ErrorMessage, response.ErrorMessage); } return; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs index 71b15ca1c1b..04c2c4e2dbb 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/UserApi.cs @@ -209,6 +209,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling CreateUser: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling CreateUser: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -283,6 +285,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling CreateUsersWithArrayInput: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling CreateUsersWithArrayInput: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -357,6 +361,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling CreateUsersWithListInput: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling CreateUsersWithListInput: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -433,6 +439,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling LoginUser: " + response.ErrorMessage, response.ErrorMessage); } return (string) ApiClient.Deserialize(response.Content, typeof(string), response.Headers); @@ -506,6 +514,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling LogoutUser: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -581,6 +591,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling GetUserByName: " + response.ErrorMessage, response.ErrorMessage); } return (User) ApiClient.Deserialize(response.Content, typeof(User), response.Headers); @@ -661,6 +673,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling UpdateUser: " + response.ErrorMessage, response.ErrorMessage); } return; @@ -742,6 +756,8 @@ namespace IO.Swagger.Api { if (((int)response.StatusCode) >= 400) { throw new ApiException ((int)response.StatusCode, "Error calling DeleteUser: " + response.Content, response.Content); + } else if (((int)response.StatusCode) == 0) { + throw new ApiException ((int)response.StatusCode, "Error calling DeleteUser: " + response.ErrorMessage, response.ErrorMessage); } return; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs index 1e259af15d4..c262f242334 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Client/ApiClient.cs @@ -41,11 +41,38 @@ namespace IO.Swagger.Client { public Object CallApi(String path, RestSharp.Method method, Dictionary queryParams, String postBody, Dictionary headerParams, Dictionary formParams, Dictionary fileParams, String[] authSettings) { - var response = Task.Run(async () => { - var resp = await CallApiAsync(path, method, queryParams, postBody, headerParams, formParams, fileParams, authSettings); - return resp; - }); - return response.Result; + + var request = new RestRequest(path, method); + + UpdateParamsForAuth(queryParams, headerParams, authSettings); + + // add default header, if any + foreach(KeyValuePair defaultHeader in this.DefaultHeaderMap) + request.AddHeader(defaultHeader.Key, defaultHeader.Value); + + // add header parameter, if any + foreach(KeyValuePair param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(KeyValuePair param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(KeyValuePair param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(KeyValuePair param in fileParams) + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + + + if (postBody != null) { + request.AddParameter("application/json", postBody, ParameterType.RequestBody); // http body (model) parameter + } + + return (Object)RestClient.Execute(request); + } public async Task CallApiAsync(String path, RestSharp.Method method, Dictionary queryParams, String postBody, @@ -120,9 +147,9 @@ namespace IO.Swagger.Client { public FileParameter ParameterToFile(string name, Stream stream) { if (stream is FileStream) { - return FileParameter.Create(name, StreamToByteArray(stream), ((FileStream)stream).Name); + return FileParameter.Create(name, StreamToByteArray(stream), Path.GetFileName(((FileStream)stream).Name)); } else { - return FileParameter.Create(name, StreamToByteArray(stream), "temp_name_here"); + return FileParameter.Create(name, StreamToByteArray(stream), "no_file_name_provided"); } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj index da68ed6dc6b..373b3ee3779 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.csproj @@ -29,9 +29,6 @@ - - packages\NUnit.2.6.3\lib\nunit.framework.dll - Lib\SwaggerClient\bin\Newtonsoft.Json.dll @@ -40,6 +37,9 @@ + + packages\NUnit.2.6.4\lib\nunit.framework.dll + @@ -57,10 +57,10 @@ - + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs index 1c38cae6799..71f478f2854 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs +++ b/samples/client/petstore/csharp/SwaggerClientTest/SwaggerClientTest.userprefs @@ -1,12 +1,11 @@  - + - + - diff --git a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll index ad431df2414..56728123662 100755 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll and b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb index 9e6329cfa9b..9f79f925ba2 100644 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb and b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll index 780727f219d..ed6550bb055 100644 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll and b/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll index ad431df2414..56728123662 100755 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll and b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb index 9e6329cfa9b..9f79f925ba2 100644 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb and b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages.config b/samples/client/petstore/csharp/SwaggerClientTest/packages.config index d4e241a20a0..09300da2fcd 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/packages.config +++ b/samples/client/petstore/csharp/SwaggerClientTest/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg deleted file mode 100644 index 61e3a5ecfc1..00000000000 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/NUnit.2.6.3.nupkg and /dev/null differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.dll b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.dll deleted file mode 100644 index 780727f219d..00000000000 Binary files a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.dll and /dev/null differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/NUnit.2.6.4.nupkg b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/NUnit.2.6.4.nupkg new file mode 100644 index 00000000000..379b15bf5cd Binary files /dev/null and b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/NUnit.2.6.4.nupkg differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.dll b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.dll new file mode 100644 index 00000000000..ed6550bb055 Binary files /dev/null and b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.dll differ diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.xml b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.xml similarity index 97% rename from samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.xml rename to samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.xml index 4c8c26e8829..532d8286707 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/lib/nunit.framework.xml +++ b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/lib/nunit.framework.xml @@ -3581,49 +3581,49 @@ - Asserts that superset is not a subject of subset. + Asserts that the superset does not contain the subset - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered - Asserts that superset is not a subject of subset. + Asserts that the superset does not contain the subset - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered The message that will be displayed on failure - Asserts that superset is not a subject of subset. + Asserts that the superset does not contain the subset - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered The message that will be displayed on failure Arguments to be used in formatting the message - Asserts that superset is a subset of subset. + Asserts that the superset contains the subset. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered - Asserts that superset is a subset of subset. + Asserts that the superset contains the subset. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered The message that will be displayed on failure - Asserts that superset is a subset of subset. + Asserts that the superset contains the subset. - The IEnumerable superset to be considered - The IEnumerable subset to be considered + The IEnumerable subset to be considered + The IEnumerable superset to be considered The message that will be displayed on failure Arguments to be used in formatting the message @@ -6551,6 +6551,23 @@ The target for the action attribute + + + Method called before each test + + Info about the test to be run + + + + Method called after each test + + Info about the test that was just run + + + + Gets or sets the ActionTargets for this attribute + + Adding this attribute to a method within a @@ -8066,7 +8083,7 @@ presence of a particular attribute on an object. - + Returns the constraint provided as an argument - used to allow custom custom constraints to easily participate in the syntax. @@ -10352,6 +10369,13 @@ The value to be tested True if no exception is thrown, otherwise false + + + Test whether the constraint is satisfied by a given delegate + + Delegate returning the value to be tested + True if no exception is thrown, otherwise false + Write the constraint description to a MessageWriter diff --git a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/license.txt b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/license.txt similarity index 89% rename from samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/license.txt rename to samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/license.txt index b12903afb5e..3b2ad7401fd 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.3/license.txt +++ b/samples/client/petstore/csharp/SwaggerClientTest/packages/NUnit.2.6.4/license.txt @@ -1,15 +1,15 @@ -Copyright © 2002-2013 Charlie Poole -Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov -Copyright © 2000-2002 Philip A. Craig - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. - -Portions Copyright © 2002-2013 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig - -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. +Copyright © 2002-2014 Charlie Poole +Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov +Copyright © 2000-2002 Philip A. Craig + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. + +Portions Copyright © 2002-2014 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution.