add unit test files for C#

This commit is contained in:
wing328
2016-01-31 01:52:41 +08:00
parent 587615b656
commit 4ce255dc38
17 changed files with 972 additions and 1 deletions

View File

@@ -0,0 +1,68 @@
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
{
[TestFixture]
public class CategoryTests
{
private Category instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new Category();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of Category
/// </summary>
[Test]
public void CategoryInstanceTest()
{
Assert.IsInstanceOf<Category> (instance, "instance is a Category");
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,104 @@
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
{
[TestFixture]
public class OrderTests
{
private Order instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new Order();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of Order
/// </summary>
[Test]
public void OrderInstanceTest()
{
Assert.IsInstanceOf<Order> (instance, "instance is a Order");
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'PetId'
/// </summary>
[Test]
public void PetIdTest()
{
// TODO: unit test for the property 'PetId'
}
/// <summary>
/// Test the property 'Quantity'
/// </summary>
[Test]
public void QuantityTest()
{
// TODO: unit test for the property 'Quantity'
}
/// <summary>
/// Test the property 'ShipDate'
/// </summary>
[Test]
public void ShipDateTest()
{
// TODO: unit test for the property 'ShipDate'
}
/// <summary>
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
}
/// <summary>
/// Test the property 'Complete'
/// </summary>
[Test]
public void CompleteTest()
{
// TODO: unit test for the property 'Complete'
}
}
}

View File

@@ -0,0 +1,141 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using RestSharp;
using NUnit.Framework;
using IO.Swagger.Client;
using IO.Swagger.Api;
using IO.Swagger.Model;
namespace IO.Swagger.Test
{
[TestFixture]
public class PetApiTests
{
private PetApi instance;
/// <summary>
/// Setup before each unit test
/// </summary>
[SetUp]
public void Init()
{
instance = new PetApi();
}
/// <summary>
/// Clean up after each unit test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of PetApi
/// </summary>
[Test]
public void InstanceTest()
{
Assert.IsInstanceOf<PetApi> (instance, "instance is a PetApi");
}
/// <summary>
/// Test UpdatePet
/// </summary>
[Test]
public void UpdatePetTest()
{
// TODO: add unit test for the method 'UpdatePet'
}
/// <summary>
/// Test AddPet
/// </summary>
[Test]
public void AddPetTest()
{
// TODO: add unit test for the method 'AddPet'
}
/// <summary>
/// Test FindPetsByStatus
/// </summary>
[Test]
public void FindPetsByStatusTest()
{
// TODO: add unit test for the method 'FindPetsByStatus'
}
/// <summary>
/// Test FindPetsByTags
/// </summary>
[Test]
public void FindPetsByTagsTest()
{
// TODO: add unit test for the method 'FindPetsByTags'
}
/// <summary>
/// Test GetPetById
/// </summary>
[Test]
public void GetPetByIdTest()
{
// TODO: add unit test for the method 'GetPetById'
}
/// <summary>
/// Test UpdatePetWithForm
/// </summary>
[Test]
public void UpdatePetWithFormTest()
{
// TODO: add unit test for the method 'UpdatePetWithForm'
}
/// <summary>
/// Test DeletePet
/// </summary>
[Test]
public void DeletePetTest()
{
// TODO: add unit test for the method 'DeletePet'
}
/// <summary>
/// Test UploadFile
/// </summary>
[Test]
public void UploadFileTest()
{
// TODO: add unit test for the method 'UploadFile'
}
/// <summary>
/// Test GetPetByIdWithByteArray
/// </summary>
[Test]
public void GetPetByIdWithByteArrayTest()
{
// TODO: add unit test for the method 'GetPetByIdWithByteArray'
}
/// <summary>
/// Test AddPetUsingByteArray
/// </summary>
[Test]
public void AddPetUsingByteArrayTest()
{
// TODO: add unit test for the method 'AddPetUsingByteArray'
}
}
}

View File

@@ -0,0 +1,104 @@
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
{
[TestFixture]
public class PetTests
{
private Pet instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new Pet();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of Pet
/// </summary>
[Test]
public void PetInstanceTest()
{
Assert.IsInstanceOf<Pet> (instance, "instance is a Pet");
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Category'
/// </summary>
[Test]
public void CategoryTest()
{
// TODO: unit test for the property 'Category'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
}
/// <summary>
/// Test the property 'PhotoUrls'
/// </summary>
[Test]
public void PhotoUrlsTest()
{
// TODO: unit test for the property 'PhotoUrls'
}
/// <summary>
/// Test the property 'Tags'
/// </summary>
[Test]
public void TagsTest()
{
// TODO: unit test for the property 'Tags'
}
/// <summary>
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO: unit test for the property 'Status'
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using RestSharp;
using NUnit.Framework;
using IO.Swagger.Client;
using IO.Swagger.Api;
using IO.Swagger.Model;
namespace IO.Swagger.Test
{
[TestFixture]
public class StoreApiTests
{
private StoreApi instance;
/// <summary>
/// Setup before each unit test
/// </summary>
[SetUp]
public void Init()
{
instance = new StoreApi();
}
/// <summary>
/// Clean up after each unit test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of StoreApi
/// </summary>
[Test]
public void InstanceTest()
{
Assert.IsInstanceOf<StoreApi> (instance, "instance is a StoreApi");
}
/// <summary>
/// Test GetInventory
/// </summary>
[Test]
public void GetInventoryTest()
{
// TODO: add unit test for the method 'GetInventory'
}
/// <summary>
/// Test PlaceOrder
/// </summary>
[Test]
public void PlaceOrderTest()
{
// TODO: add unit test for the method 'PlaceOrder'
}
/// <summary>
/// Test GetOrderById
/// </summary>
[Test]
public void GetOrderByIdTest()
{
// TODO: add unit test for the method 'GetOrderById'
}
/// <summary>
/// Test DeleteOrder
/// </summary>
[Test]
public void DeleteOrderTest()
{
// TODO: add unit test for the method 'DeleteOrder'
}
}
}

View File

@@ -0,0 +1,68 @@
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
{
[TestFixture]
public class TagTests
{
private Tag instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new Tag();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of Tag
/// </summary>
[Test]
public void TagInstanceTest()
{
Assert.IsInstanceOf<Tag> (instance, "instance is a Tag");
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO: unit test for the property 'Name'
}
}
}

View File

@@ -0,0 +1,123 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using RestSharp;
using NUnit.Framework;
using IO.Swagger.Client;
using IO.Swagger.Api;
using IO.Swagger.Model;
namespace IO.Swagger.Test
{
[TestFixture]
public class UserApiTests
{
private UserApi instance;
/// <summary>
/// Setup before each unit test
/// </summary>
[SetUp]
public void Init()
{
instance = new UserApi();
}
/// <summary>
/// Clean up after each unit test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of UserApi
/// </summary>
[Test]
public void InstanceTest()
{
Assert.IsInstanceOf<UserApi> (instance, "instance is a UserApi");
}
/// <summary>
/// Test CreateUser
/// </summary>
[Test]
public void CreateUserTest()
{
// TODO: add unit test for the method 'CreateUser'
}
/// <summary>
/// Test CreateUsersWithArrayInput
/// </summary>
[Test]
public void CreateUsersWithArrayInputTest()
{
// TODO: add unit test for the method 'CreateUsersWithArrayInput'
}
/// <summary>
/// Test CreateUsersWithListInput
/// </summary>
[Test]
public void CreateUsersWithListInputTest()
{
// TODO: add unit test for the method 'CreateUsersWithListInput'
}
/// <summary>
/// Test LoginUser
/// </summary>
[Test]
public void LoginUserTest()
{
// TODO: add unit test for the method 'LoginUser'
}
/// <summary>
/// Test LogoutUser
/// </summary>
[Test]
public void LogoutUserTest()
{
// TODO: add unit test for the method 'LogoutUser'
}
/// <summary>
/// Test GetUserByName
/// </summary>
[Test]
public void GetUserByNameTest()
{
// TODO: add unit test for the method 'GetUserByName'
}
/// <summary>
/// Test UpdateUser
/// </summary>
[Test]
public void UpdateUserTest()
{
// TODO: add unit test for the method 'UpdateUser'
}
/// <summary>
/// Test DeleteUser
/// </summary>
[Test]
public void DeleteUserTest()
{
// TODO: add unit test for the method 'DeleteUser'
}
}
}

View File

@@ -0,0 +1,122 @@
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
{
[TestFixture]
public class UserTests
{
private User instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
instance = new User();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of User
/// </summary>
[Test]
public void UserInstanceTest()
{
Assert.IsInstanceOf<User> (instance, "instance is a User");
}
/// <summary>
/// Test the property 'Id'
/// </summary>
[Test]
public void IdTest()
{
// TODO: unit test for the property 'Id'
}
/// <summary>
/// Test the property 'Username'
/// </summary>
[Test]
public void UsernameTest()
{
// TODO: unit test for the property 'Username'
}
/// <summary>
/// Test the property 'FirstName'
/// </summary>
[Test]
public void FirstNameTest()
{
// TODO: unit test for the property 'FirstName'
}
/// <summary>
/// Test the property 'LastName'
/// </summary>
[Test]
public void LastNameTest()
{
// TODO: unit test for the property 'LastName'
}
/// <summary>
/// Test the property 'Email'
/// </summary>
[Test]
public void EmailTest()
{
// TODO: unit test for the property 'Email'
}
/// <summary>
/// Test the property 'Password'
/// </summary>
[Test]
public void PasswordTest()
{
// TODO: unit test for the property 'Password'
}
/// <summary>
/// Test the property 'Phone'
/// </summary>
[Test]
public void PhoneTest()
{
// TODO: unit test for the property 'Phone'
}
/// <summary>
/// Test the property 'UserStatus'
/// </summary>
[Test]
public void UserStatusTest()
{
// TODO: unit test for the property 'UserStatus'
}
}
}