forked from loafle/openapi-generator-original
fix test cases, fix warning in exceptionfactory, update
.swagger-codegen-ignore for c# to keep logo file (for upload test)
This commit is contained in:
parent
6ddf34ce8a
commit
bca3d24d20
@ -1,7 +1,15 @@
|
|||||||
|
{{>partial_header}}
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
|
|
||||||
namespace {{packageName}}.Client
|
namespace {{packageName}}.Client
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A delegate to ExceptionFactory method
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="methodName">Method name</param>
|
||||||
|
/// <param name="response">Response</param>
|
||||||
|
/// <returns>Exceptions</returns>
|
||||||
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ namespace {{packageName}}.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void {{operationId}}InstanceTest()
|
public void {{operationId}}InstanceTest()
|
||||||
{
|
{
|
||||||
// TODO uncomment below to test 'IsInstanceOfType' {{classname}}
|
// test 'IsInstanceOfType' {{classname}}
|
||||||
Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}");
|
Assert.IsInstanceOfType(typeof({{classname}}), instance, "instance is a {{classname}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,9 +62,9 @@ namespace {{packageName}}.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void {{operationId}}Test()
|
public void {{operationId}}Test()
|
||||||
{
|
{
|
||||||
// TODO uncomment below to test the method '{{operationId}}'
|
// TODO uncomment below to test the method and replace null with proper value
|
||||||
{{#allParams}}
|
{{#allParams}}
|
||||||
//{{{dataType}}} {{paramName}} = null; // TODO: replace null with proper value
|
//{{{dataType}}} {{paramName}} = null;
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
//{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
//{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
{{#returnType}}//Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}}
|
{{#returnType}}//Assert.IsInstanceOf<{{{returnType}}}> (response, "response is {{{returnType}}}");{{/returnType}}
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
frameworkVersion={{targetFrameworkNuget}}
|
frameworkVersion={{targetFrameworkNuget}}
|
||||||
netfx=${frameworkVersion#net}
|
netfx=${frameworkVersion#net}
|
||||||
|
|
||||||
@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages"
|
|||||||
wget -nc https://nuget.org/nuget.exe;
|
wget -nc https://nuget.org/nuget.exe;
|
||||||
mozroots --import --sync
|
mozroots --import --sync
|
||||||
mono nuget.exe install src/{{packageName}}/packages.config -o packages;
|
mono nuget.exe install src/{{packageName}}/packages.config -o packages;
|
||||||
mkdir -p bin;
|
|
||||||
|
|
||||||
echo "[INFO] Copy DLLs to the 'bin' folder"
|
echo "[INFO] Copy DLLs to the 'bin' folder"
|
||||||
|
mkdir -p bin;
|
||||||
cp packages/Newtonsoft.Json.8.0.3/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
cp packages/Newtonsoft.Json.8.0.3/lib/{{targetFrameworkNuget}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
||||||
cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
|
cp packages/RestSharp.105.1.0/lib/{{targetFrameworkNuget}}/RestSharp.dll bin/RestSharp.dll;
|
||||||
|
|
||||||
@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \
|
|||||||
-recurse:'src/{{packageName}}/*.cs' \
|
-recurse:'src/{{packageName}}/*.cs' \
|
||||||
-doc:bin/{{packageName}}.xml \
|
-doc:bin/{{packageName}}.xml \
|
||||||
-platform:anycpu
|
-platform:anycpu
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "[ERROR] Compilation failed with exit code $?"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[INFO] bin/{{{packageName}}}.dll was created successfully"
|
||||||
|
fi
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
:: Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
::
|
||||||
|
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
:: you may not use this file except in compliance with the License.
|
||||||
|
:: You may obtain a copy of the License at
|
||||||
|
::
|
||||||
|
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
::
|
||||||
|
:: Unless required by applicable law or agreed to in writing, software
|
||||||
|
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
:: See the License for the specific language governing permissions and
|
||||||
|
:: limitations under the License.
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}}
|
{{#supportsAsync}}SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319{{/supportsAsync}}
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
wget -nc https://nuget.org/nuget.exe
|
wget -nc https://nuget.org/nuget.exe
|
||||||
mozroots --import --sync
|
mozroots --import --sync
|
||||||
|
|
||||||
|
@ -21,3 +21,4 @@
|
|||||||
#docs/*.md
|
#docs/*.md
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
#!docs/README.md
|
#!docs/README.md
|
||||||
|
src/IO.Swagger.Test/IO.Swagger.Test.csproj
|
||||||
|
@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
VisualStudioVersion = 12.0.0.0
|
VisualStudioVersion = 12.0.0.0
|
||||||
MinimumVisualStudioVersion = 10.0.0.1
|
MinimumVisualStudioVersion = 10.0.0.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{64A65E8F-EACE-4663-9B82-B565E01CFEAE}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{7B20DAE3-B510-4814-8986-CF1B89EA039E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
|
|||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{64A65E8F-EACE-4663-9B82-B565E01CFEAE}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7B20DAE3-B510-4814-8986-CF1B89EA039E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
|
|||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- SDK version: 1.0.0
|
- SDK version: 1.0.0
|
||||||
- Build date: 2016-06-12T01:56:22.092+08:00
|
- Build date: 2016-06-12T12:38:46.317+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen
|
||||||
|
|
||||||
## Frameworks supported
|
## Frameworks supported
|
||||||
|
@ -1,3 +1,17 @@
|
|||||||
|
:: Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
::
|
||||||
|
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
:: you may not use this file except in compliance with the License.
|
||||||
|
:: You may obtain a copy of the License at
|
||||||
|
::
|
||||||
|
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
::
|
||||||
|
:: Unless required by applicable law or agreed to in writing, software
|
||||||
|
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
:: See the License for the specific language governing permissions and
|
||||||
|
:: limitations under the License.
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
|
SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
frameworkVersion=net45
|
frameworkVersion=net45
|
||||||
netfx=${frameworkVersion#net}
|
netfx=${frameworkVersion#net}
|
||||||
|
|
||||||
@ -8,9 +23,9 @@ echo "[INFO] Download nuget and packages"
|
|||||||
wget -nc https://nuget.org/nuget.exe;
|
wget -nc https://nuget.org/nuget.exe;
|
||||||
mozroots --import --sync
|
mozroots --import --sync
|
||||||
mono nuget.exe install src/IO.Swagger/packages.config -o packages;
|
mono nuget.exe install src/IO.Swagger/packages.config -o packages;
|
||||||
mkdir -p bin;
|
|
||||||
|
|
||||||
echo "[INFO] Copy DLLs to the 'bin' folder"
|
echo "[INFO] Copy DLLs to the 'bin' folder"
|
||||||
|
mkdir -p bin;
|
||||||
cp packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
cp packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
|
||||||
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
|
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
|
||||||
|
|
||||||
@ -23,3 +38,11 @@ System.Runtime.Serialization.dll \
|
|||||||
-recurse:'src/IO.Swagger/*.cs' \
|
-recurse:'src/IO.Swagger/*.cs' \
|
||||||
-doc:bin/IO.Swagger.xml \
|
-doc:bin/IO.Swagger.xml \
|
||||||
-platform:anycpu
|
-platform:anycpu
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "[ERROR] Compilation failed with exit code $?"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[INFO] bin/IO.Swagger.dll was created successfully"
|
||||||
|
fi
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
wget -nc https://nuget.org/nuget.exe
|
wget -nc https://nuget.org/nuget.exe
|
||||||
mozroots --import --sync
|
mozroots --import --sync
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void InstanceTest()
|
public void InstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<FakeApi> (instance, "instance is a FakeApi");
|
Assert.IsInstanceOfType(typeof(FakeApi), instance, "instance is a FakeApi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void InstanceTest()
|
public void InstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<PetApi> (instance, "instance is a PetApi");
|
Assert.IsInstanceOfType(typeof(PetApi), instance, "instance is a PetApi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ namespace IO.Swagger.Test
|
|||||||
List<Pet> listPet = petApi.FindPetsByTags (tagsList);
|
List<Pet> listPet = petApi.FindPetsByTags (tagsList);
|
||||||
foreach (Pet pet in listPet) // Loop through List with foreach.
|
foreach (Pet pet in listPet) // Loop through List with foreach.
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Pet> (pet, "Response is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), pet, "Response is a Pet");
|
||||||
Assert.AreEqual ("csharp sample tag name1", pet.Tags[0]);
|
Assert.AreEqual ("csharp sample tag name1", pet.Tags[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ namespace IO.Swagger.Test
|
|||||||
{
|
{
|
||||||
List<string> tags = new List<String>(new String[] {"pet"});
|
List<string> tags = new List<String>(new String[] {"pet"});
|
||||||
var response = instance.FindPetsByTags(tags);
|
var response = instance.FindPetsByTags(tags);
|
||||||
Assert.IsInstanceOf<List<Pet>> (response, "response is List<Pet>");
|
Assert.IsInstanceOfType(typeof(List<Pet>), response, "response is List<Pet>");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -161,19 +161,19 @@ namespace IO.Swagger.Test
|
|||||||
|
|
||||||
PetApi petApi = new PetApi (c1);
|
PetApi petApi = new PetApi (c1);
|
||||||
Pet response = petApi.GetPetById (petId);
|
Pet response = petApi.GetPetById (petId);
|
||||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||||
|
|
||||||
Assert.AreEqual ("Csharp test", response.Name);
|
Assert.AreEqual ("Csharp test", response.Name);
|
||||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||||
|
|
||||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||||
Assert.AreEqual (56, response.Category.Id);
|
Assert.AreEqual (56, response.Category.Id);
|
||||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||||
}
|
}
|
||||||
@ -187,19 +187,19 @@ namespace IO.Swagger.Test
|
|||||||
PetApi petApi = new PetApi ();
|
PetApi petApi = new PetApi ();
|
||||||
var task = petApi.GetPetByIdAsync (petId);
|
var task = petApi.GetPetByIdAsync (petId);
|
||||||
Pet response = task.Result;
|
Pet response = task.Result;
|
||||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||||
|
|
||||||
Assert.AreEqual ("Csharp test", response.Name);
|
Assert.AreEqual ("Csharp test", response.Name);
|
||||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||||
|
|
||||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||||
Assert.AreEqual (56, response.Category.Id);
|
Assert.AreEqual (56, response.Category.Id);
|
||||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||||
|
|
||||||
@ -219,19 +219,19 @@ namespace IO.Swagger.Test
|
|||||||
Assert.AreEqual (task.Result.Headers["Content-Type"], "application/json");
|
Assert.AreEqual (task.Result.Headers["Content-Type"], "application/json");
|
||||||
|
|
||||||
Pet response = task.Result.Data;
|
Pet response = task.Result.Data;
|
||||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||||
|
|
||||||
Assert.AreEqual ("Csharp test", response.Name);
|
Assert.AreEqual ("Csharp test", response.Name);
|
||||||
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
Assert.AreEqual (Pet.StatusEnum.Available, response.Status);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||||
Assert.AreEqual (petId, response.Tags [0].Id);
|
Assert.AreEqual (petId, response.Tags [0].Id);
|
||||||
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
Assert.AreEqual ("csharp sample tag name1", response.Tags [0].Name);
|
||||||
|
|
||||||
Assert.IsInstanceOf<List<String>> (response.PhotoUrls, "Response.PhotoUrls is a Array");
|
Assert.IsInstanceOfType(typeof(List<String>), response.PhotoUrls, "Response.PhotoUrls is a Array");
|
||||||
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
Assert.AreEqual ("sample photoUrls", response.PhotoUrls [0]);
|
||||||
|
|
||||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||||
Assert.AreEqual (56, response.Category.Id);
|
Assert.AreEqual (56, response.Category.Id);
|
||||||
Assert.AreEqual ("sample category name2", response.Category.Name);
|
Assert.AreEqual ("sample category name2", response.Category.Name);
|
||||||
|
|
||||||
@ -258,9 +258,9 @@ namespace IO.Swagger.Test
|
|||||||
petApi.UpdatePetWithForm (petId, "new form name", "pending");
|
petApi.UpdatePetWithForm (petId, "new form name", "pending");
|
||||||
|
|
||||||
Pet response = petApi.GetPetById (petId);
|
Pet response = petApi.GetPetById (petId);
|
||||||
Assert.IsInstanceOf<Pet> (response, "Response is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), response, "Response is a Pet");
|
||||||
Assert.IsInstanceOf<Category> (response.Category, "Response.Category is a Category");
|
Assert.IsInstanceOfType(typeof(Category), response.Category, "Response.Category is a Category");
|
||||||
Assert.IsInstanceOf<List<Tag>> (response.Tags, "Response.Tags is a Array");
|
Assert.IsInstanceOfType(typeof(List<Tag>), response.Tags, "Response.Tags is a Array");
|
||||||
|
|
||||||
Assert.AreEqual ("new form name", response.Name);
|
Assert.AreEqual ("new form name", response.Name);
|
||||||
Assert.AreEqual (Pet.StatusEnum.Pending, response.Status);
|
Assert.AreEqual (Pet.StatusEnum.Pending, response.Status);
|
||||||
|
@ -50,7 +50,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void InstanceTest()
|
public void InstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<StoreApi> (instance, "instance is a StoreApi");
|
Assert.IsInstanceOfType(typeof(StoreApi), instance, "instance is a StoreApi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ namespace IO.Swagger.Test
|
|||||||
|
|
||||||
foreach(KeyValuePair<string, int?> entry in response)
|
foreach(KeyValuePair<string, int?> entry in response)
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf (typeof(int?), entry.Value);
|
Assert.IsInstanceOfType(typeof(int?), entry.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void InstanceTest()
|
public void InstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<UserApi> (instance, "instance is a UserApi");
|
Assert.IsInstanceOfType(typeof(UserApi), instance, "instance is a UserApi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
@ -59,36 +59,38 @@ limitations under the License.
|
|||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Newtonsoft.Json">
|
<Reference Include="Newtonsoft.Json">
|
||||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestSharp">
|
<Reference Include="RestSharp">
|
||||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="nunit.framework">
|
<Reference Include="nunit.framework">
|
||||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
||||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.3.2.1\lib\nunit.framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs"/>
|
<Compile Include="**\*.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
||||||
<Project>{64A65E8F-EACE-4663-9B82-B565E01CFEAE}</Project>
|
<Project>{85AE8212-9819-4224-A9E5-B93419EC927B}</Project>
|
||||||
<Name>IO.Swagger</Name>
|
<Name>IO.Swagger</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="swagger-logo.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void AdditionalPropertiesClassInstanceTest()
|
public void AdditionalPropertiesClassInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<AdditionalPropertiesClass> (instance, "instance is a AdditionalPropertiesClass");
|
Assert.IsInstanceOfType(typeof(AdditionalPropertiesClass), instance, "instance is a AdditionalPropertiesClass");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void AnimalFarmInstanceTest()
|
public void AnimalFarmInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<AnimalFarm> (instance, "instance is a AnimalFarm");
|
Assert.IsInstanceOfType(typeof(AnimalFarm), instance, "instance is a AnimalFarm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void AnimalInstanceTest()
|
public void AnimalInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Animal> (instance, "instance is a Animal");
|
Assert.IsInstanceOfType(typeof(Animal), instance, "instance is a Animal");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void ApiResponseInstanceTest()
|
public void ApiResponseInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<ApiResponse> (instance, "instance is a ApiResponse");
|
Assert.IsInstanceOfType(typeof(ApiResponse), instance, "instance is a ApiResponse");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void ArrayTestInstanceTest()
|
public void ArrayTestInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<ArrayTest> (instance, "instance is a ArrayTest");
|
Assert.IsInstanceOfType(typeof(ArrayTest), instance, "instance is a ArrayTest");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void CatInstanceTest()
|
public void CatInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Cat> (instance, "instance is a Cat");
|
Assert.IsInstanceOfType(typeof(Cat), instance, "instance is a Cat");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void CategoryInstanceTest()
|
public void CategoryInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Category> (instance, "instance is a Category");
|
Assert.IsInstanceOfType(typeof(Category), instance, "instance is a Category");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void DogInstanceTest()
|
public void DogInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Dog> (instance, "instance is a Dog");
|
Assert.IsInstanceOfType(typeof(Dog), instance, "instance is a Dog");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void EnumClassInstanceTest()
|
public void EnumClassInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<EnumClass> (instance, "instance is a EnumClass");
|
Assert.IsInstanceOfType(typeof(EnumClass), instance, "instance is a EnumClass");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void EnumTestInstanceTest()
|
public void EnumTestInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<EnumTest> (instance, "instance is a EnumTest");
|
Assert.IsInstanceOfType(typeof(EnumTest), instance, "instance is a EnumTest");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void FormatTestInstanceTest()
|
public void FormatTestInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<FormatTest> (instance, "instance is a FormatTest");
|
Assert.IsInstanceOfType(typeof(FormatTest), instance, "instance is a FormatTest");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest()
|
public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<MixedPropertiesAndAdditionalPropertiesClass> (instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass");
|
Assert.IsInstanceOfType(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance, "instance is a MixedPropertiesAndAdditionalPropertiesClass");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void Model200ResponseInstanceTest()
|
public void Model200ResponseInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Model200Response> (instance, "instance is a Model200Response");
|
Assert.IsInstanceOfType(typeof(Model200Response), instance, "instance is a Model200Response");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void ModelReturnInstanceTest()
|
public void ModelReturnInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<ModelReturn> (instance, "instance is a ModelReturn");
|
Assert.IsInstanceOfType(typeof(ModelReturn), instance, "instance is a ModelReturn");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void NameInstanceTest()
|
public void NameInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Name> (instance, "instance is a Name");
|
Assert.IsInstanceOfType(typeof(Name), instance, "instance is a Name");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -57,7 +57,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void OrderInstanceTest()
|
public void OrderInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Order> (instance, "instance is a Order");
|
Assert.IsInstanceOfType(typeof(Order), instance, "instance is a Order");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -49,7 +49,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void PetInstanceTest()
|
public void PetInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Pet> (instance, "instance is a Pet");
|
Assert.IsInstanceOfType(typeof(Pet), instance, "instance is a Pet");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void ReadOnlyFirstInstanceTest()
|
public void ReadOnlyFirstInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<ReadOnlyFirst> (instance, "instance is a ReadOnlyFirst");
|
Assert.IsInstanceOfType(typeof(ReadOnlyFirst), instance, "instance is a ReadOnlyFirst");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void SpecialModelNameInstanceTest()
|
public void SpecialModelNameInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<SpecialModelName> (instance, "instance is a SpecialModelName");
|
Assert.IsInstanceOfType(typeof(SpecialModelName), instance, "instance is a SpecialModelName");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void TagInstanceTest()
|
public void TagInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<Tag> (instance, "instance is a Tag");
|
Assert.IsInstanceOfType(typeof(Tag), instance, "instance is a Tag");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,7 +47,7 @@ namespace IO.Swagger.Test
|
|||||||
[Test]
|
[Test]
|
||||||
public void UserInstanceTest()
|
public void UserInstanceTest()
|
||||||
{
|
{
|
||||||
Assert.IsInstanceOf<User> (instance, "instance is a User");
|
Assert.IsInstanceOfType(typeof(User), instance, "instance is a User");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,7 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using RestSharp;
|
using RestSharp;
|
||||||
|
|
||||||
namespace IO.Swagger.Client
|
namespace IO.Swagger.Client
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A delegate to ExceptionFactory method
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="methodName">Method name</param>
|
||||||
|
/// <param name="response">Response</param>
|
||||||
|
/// <returns>Exceptions</returns>
|
||||||
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
public delegate Exception ExceptionFactory(string methodName, IRestResponse response);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ limitations under the License.
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProjectGuid>{64A65E8F-EACE-4663-9B82-B565E01CFEAE}</ProjectGuid>
|
<ProjectGuid>{7B20DAE3-B510-4814-8986-CF1B89EA039E}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>Swagger Library</RootNamespace>
|
<RootNamespace>Swagger Library</RootNamespace>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user