forked from loafle/openapi-generator-original
[C#] fix build.sh for PropertyChanged feature in C# API client (#4349)
* fix build.sh for PropertyChange in C# * add new csharp files * manual fix to enum ref in c# client
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ArrayOfArrayOfNumberOnly
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ArrayOfArrayOfNumberOnlyTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly
|
||||
//private ArrayOfArrayOfNumberOnly instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly
|
||||
//instance = new ArrayOfArrayOfNumberOnly();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ArrayOfArrayOfNumberOnly
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ArrayOfArrayOfNumberOnlyInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" ArrayOfArrayOfNumberOnly
|
||||
//Assert.IsInstanceOfType<ArrayOfArrayOfNumberOnly> (instance, "variable 'instance' is a ArrayOfArrayOfNumberOnly");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'ArrayArrayNumber'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ArrayArrayNumberTest()
|
||||
{
|
||||
// TODO unit test for the property 'ArrayArrayNumber'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ArrayOfNumberOnly
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ArrayOfNumberOnlyTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for ArrayOfNumberOnly
|
||||
//private ArrayOfNumberOnly instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of ArrayOfNumberOnly
|
||||
//instance = new ArrayOfNumberOnly();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ArrayOfNumberOnly
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ArrayOfNumberOnlyInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" ArrayOfNumberOnly
|
||||
//Assert.IsInstanceOfType<ArrayOfNumberOnly> (instance, "variable 'instance' is a ArrayOfNumberOnly");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'ArrayNumber'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ArrayNumberTest()
|
||||
{
|
||||
// TODO unit test for the property 'ArrayNumber'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ClassModel
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ClassModelTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for ClassModel
|
||||
//private ClassModel instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of ClassModel
|
||||
//instance = new ClassModel();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ClassModel
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ClassModelInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" ClassModel
|
||||
//Assert.IsInstanceOfType<ClassModel> (instance, "variable 'instance' is a ClassModel");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Class'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ClassTest()
|
||||
{
|
||||
// TODO unit test for the property '_Class'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing EnumArrays
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class EnumArraysTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for EnumArrays
|
||||
//private EnumArrays instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of EnumArrays
|
||||
//instance = new EnumArrays();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of EnumArrays
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void EnumArraysInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" EnumArrays
|
||||
//Assert.IsInstanceOfType<EnumArrays> (instance, "variable 'instance' is a EnumArrays");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'JustSymbol'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void JustSymbolTest()
|
||||
{
|
||||
// TODO unit test for the property 'JustSymbol'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'ArrayEnum'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ArrayEnumTest()
|
||||
{
|
||||
// TODO unit test for the property 'ArrayEnum'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing HasOnlyReadOnly
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class HasOnlyReadOnlyTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for HasOnlyReadOnly
|
||||
//private HasOnlyReadOnly instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of HasOnlyReadOnly
|
||||
//instance = new HasOnlyReadOnly();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of HasOnlyReadOnly
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void HasOnlyReadOnlyInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" HasOnlyReadOnly
|
||||
//Assert.IsInstanceOfType<HasOnlyReadOnly> (instance, "variable 'instance' is a HasOnlyReadOnly");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Bar'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BarTest()
|
||||
{
|
||||
// TODO unit test for the property 'Bar'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Foo'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FooTest()
|
||||
{
|
||||
// TODO unit test for the property 'Foo'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing List
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ListTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for List
|
||||
//private List instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of List
|
||||
//instance = new List();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of List
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ListInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" List
|
||||
//Assert.IsInstanceOfType<List> (instance, "variable 'instance' is a List");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_123List'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _123ListTest()
|
||||
{
|
||||
// TODO unit test for the property '_123List'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing MapTest
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class MapTestTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for MapTest
|
||||
//private MapTest instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of MapTest
|
||||
//instance = new MapTest();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of MapTest
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void MapTestInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" MapTest
|
||||
//Assert.IsInstanceOfType<MapTest> (instance, "variable 'instance' is a MapTest");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'MapMapOfString'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void MapMapOfStringTest()
|
||||
{
|
||||
// TODO unit test for the property 'MapMapOfString'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'MapOfEnumString'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void MapOfEnumStringTest()
|
||||
{
|
||||
// TODO unit test for the property 'MapOfEnumString'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing ModelClient
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class ModelClientTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for ModelClient
|
||||
//private ModelClient instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of ModelClient
|
||||
//instance = new ModelClient();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of ModelClient
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ModelClientInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" ModelClient
|
||||
//Assert.IsInstanceOfType<ModelClient> (instance, "variable 'instance' is a ModelClient");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property '_Client'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void _ClientTest()
|
||||
{
|
||||
// TODO unit test for the property '_Client'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing NumberOnly
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class NumberOnlyTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for NumberOnly
|
||||
//private NumberOnly instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of NumberOnly
|
||||
//instance = new NumberOnly();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of NumberOnly
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NumberOnlyInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" NumberOnly
|
||||
//Assert.IsInstanceOfType<NumberOnly> (instance, "variable 'instance' is a NumberOnly");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'JustNumber'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void JustNumberTest()
|
||||
{
|
||||
// TODO unit test for the property 'JustNumber'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using IO.Swagger.Api;
|
||||
using IO.Swagger.Model;
|
||||
using IO.Swagger.Client;
|
||||
using System.Reflection;
|
||||
|
||||
namespace IO.Swagger.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing OuterEnum
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by Swagger Codegen.
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class OuterEnumTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for OuterEnum
|
||||
//private OuterEnum instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of OuterEnum
|
||||
//instance = new OuterEnum();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of OuterEnum
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void OuterEnumInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" OuterEnum
|
||||
//Assert.IsInstanceOfType<OuterEnum> (instance, "variable 'instance' is a OuterEnum");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns></returns>
|
||||
void TestEnumParameters (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
void TestEnumParameters (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters
|
||||
@@ -126,7 +126,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@@ -213,7 +213,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestEnumParametersAsync (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
System.Threading.Tasks.Task TestEnumParametersAsync (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
|
||||
/// <summary>
|
||||
/// To test enum parameters
|
||||
@@ -231,7 +231,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null);
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@@ -768,7 +768,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns></returns>
|
||||
public void TestEnumParameters (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
public void TestEnumParameters (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
{
|
||||
TestEnumParametersWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||
}
|
||||
@@ -786,7 +786,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
public ApiResponse<Object> TestEnumParametersWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/fake";
|
||||
@@ -856,7 +856,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestEnumParametersAsync (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
public async System.Threading.Tasks.Task TestEnumParametersAsync (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
{
|
||||
await TestEnumParametersAsyncWithHttpInfo(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
|
||||
|
||||
@@ -875,7 +875,7 @@ namespace IO.Swagger.Api
|
||||
/// <param name="enumQueryInteger">Query parameter enum test (double) (optional)</param>
|
||||
/// <param name="enumQueryDouble">Query parameter enum test (double) (optional)</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
public async System.Threading.Tasks.Task<ApiResponse<Object>> TestEnumParametersAsyncWithHttpInfo (List<string> enumFormStringArray = null, string enumFormString = null, List<string> enumHeaderStringArray = null, string enumHeaderString = null, List<string> enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null)
|
||||
{
|
||||
|
||||
var localVarPath = "/fake";
|
||||
|
||||
@@ -6,13 +6,12 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Contact: apiteam@swagger.io
|
||||
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||
-->
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CD650877-711F-40DC-9804-E09CE6CF93CE}</ProjectGuid>
|
||||
<ProjectGuid>{108D4EC7-6EA0-4D25-A8EC-653076D76ADC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>IO.Swagger</RootNamespace>
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Model for testing model with \"_class\" property
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class ClassModel : IEquatable<ClassModel>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClassModel" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_Class">_Class.</param>
|
||||
public ClassModel(string _Class = null)
|
||||
{
|
||||
this._Class = _Class;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets _Class
|
||||
/// </summary>
|
||||
[DataMember(Name="_class", EmitDefaultValue=false)]
|
||||
public string _Class { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ClassModel {\n");
|
||||
sb.Append(" _Class: ").Append(_Class).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="obj">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/10454552/677735
|
||||
return this.Equals(obj as ClassModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if ClassModel instances are equal
|
||||
/// </summary>
|
||||
/// <param name="other">Instance of ClassModel to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(ClassModel other)
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/10454552/677735
|
||||
if (other == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this._Class == other._Class ||
|
||||
this._Class != null &&
|
||||
this._Class.Equals(other._Class)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
// credit: http://stackoverflow.com/a/263416/677735
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this._Class != null)
|
||||
hash = hash * 59 + this._Class.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,13 +110,20 @@ namespace IO.Swagger.Model
|
||||
/// <param name="EnumString">EnumString.</param>
|
||||
/// <param name="EnumInteger">EnumInteger.</param>
|
||||
/// <param name="EnumNumber">EnumNumber.</param>
|
||||
public EnumTest(EnumStringEnum? EnumString = null, EnumIntegerEnum? EnumInteger = null, EnumNumberEnum? EnumNumber = null)
|
||||
/// <param name="OuterEnum">OuterEnum.</param>
|
||||
public EnumTest(EnumStringEnum? EnumString = null, EnumIntegerEnum? EnumInteger = null, EnumNumberEnum? EnumNumber = null, OuterEnum? OuterEnum = null)
|
||||
{
|
||||
this.EnumString = EnumString;
|
||||
this.EnumInteger = EnumInteger;
|
||||
this.EnumNumber = EnumNumber;
|
||||
this.OuterEnum = OuterEnum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets OuterEnum
|
||||
/// </summary>
|
||||
[DataMember(Name="outerEnum", EmitDefaultValue=false)]
|
||||
public OuterEnum? OuterEnum { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@@ -128,6 +135,7 @@ namespace IO.Swagger.Model
|
||||
sb.Append(" EnumString: ").Append(EnumString).Append("\n");
|
||||
sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n");
|
||||
sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n");
|
||||
sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -178,6 +186,11 @@ namespace IO.Swagger.Model
|
||||
this.EnumNumber == other.EnumNumber ||
|
||||
this.EnumNumber != null &&
|
||||
this.EnumNumber.Equals(other.EnumNumber)
|
||||
) &&
|
||||
(
|
||||
this.OuterEnum == other.OuterEnum ||
|
||||
this.OuterEnum != null &&
|
||||
this.OuterEnum.Equals(other.OuterEnum)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -198,6 +211,8 @@ namespace IO.Swagger.Model
|
||||
hash = hash * 59 + this.EnumInteger.GetHashCode();
|
||||
if (this.EnumNumber != null)
|
||||
hash = hash * 59 + this.EnumNumber.GetHashCode();
|
||||
if (this.OuterEnum != null)
|
||||
hash = hash * 59 + this.OuterEnum.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,27 +332,27 @@ namespace IO.Swagger.Model
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Integer (int?) maximum
|
||||
if(this.Integer > (int?)100.0)
|
||||
if(this.Integer > (int?)100)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.0.", new [] { "Integer" });
|
||||
yield return new ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
|
||||
}
|
||||
|
||||
// Integer (int?) minimum
|
||||
if(this.Integer < (int?)10.0)
|
||||
if(this.Integer < (int?)10)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.0.", new [] { "Integer" });
|
||||
yield return new ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
||||
}
|
||||
|
||||
// Int32 (int?) maximum
|
||||
if(this.Int32 > (int?)200.0)
|
||||
if(this.Int32 > (int?)200)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.0.", new [] { "Int32" });
|
||||
yield return new ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
|
||||
}
|
||||
|
||||
// Int32 (int?) minimum
|
||||
if(this.Int32 < (int?)20.0)
|
||||
if(this.Int32 < (int?)20)
|
||||
{
|
||||
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.0.", new [] { "Int32" });
|
||||
yield return new ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
||||
}
|
||||
|
||||
// Number (decimal?) maximum
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IO.Swagger.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines OuterEnum
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum OuterEnum
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Enum Placed for "placed"
|
||||
/// </summary>
|
||||
[EnumMember(Value = "placed")]
|
||||
Placed,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Approved for "approved"
|
||||
/// </summary>
|
||||
[EnumMember(Value = "approved")]
|
||||
Approved,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Delivered for "delivered"
|
||||
/// </summary>
|
||||
[EnumMember(Value = "delivered")]
|
||||
Delivered
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user