diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java
index 76c0d1277b1..df23c1f2275 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/AbstractCSharpCodegen.java
@@ -89,7 +89,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
"Int64",
"Float",
"Guid",
- "Stream", // not really a primitive, we include it to avoid model import
+ "System.IO.Stream", // not really a primitive, we include it to avoid model import
"Object")
);
@@ -110,7 +110,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
typeMapping.put("number", "double?");
typeMapping.put("datetime", "DateTime?");
typeMapping.put("date", "DateTime?");
- typeMapping.put("file", "Stream");
+ typeMapping.put("file", "System.IO.Stream");
typeMapping.put("array", "List");
typeMapping.put("list", "List");
typeMapping.put("map", "Dictionary");
diff --git a/modules/swagger-codegen/src/main/resources/csharp/api.mustache b/modules/swagger-codegen/src/main/resources/csharp/api.mustache
index 18c675d6350..85af270c213 100644
--- a/modules/swagger-codegen/src/main/resources/csharp/api.mustache
+++ b/modules/swagger-codegen/src/main/resources/csharp/api.mustache
@@ -1,5 +1,4 @@
using System;
-using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs
new file mode 100644
index 00000000000..861ca5fe026
--- /dev/null
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/AnimalTests.cs
@@ -0,0 +1,64 @@
+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
+{
+ ///
+ /// Class for testing Animal
+ ///
+ ///
+ /// This file is automatically generated by Swagger Codegen.
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class AnimalTests
+ {
+ private Animal instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ instance = new Animal();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of Animal
+ ///
+ [Test]
+ public void AnimalInstanceTest()
+ {
+ Assert.IsInstanceOf (instance, "instance is a Animal");
+ }
+
+ ///
+ /// Test the property 'ClassName'
+ ///
+ [Test]
+ public void ClassNameTest()
+ {
+ // TODO: unit test for the property 'ClassName'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs
new file mode 100644
index 00000000000..15cc1ab22de
--- /dev/null
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/CatTests.cs
@@ -0,0 +1,72 @@
+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
+{
+ ///
+ /// Class for testing Cat
+ ///
+ ///
+ /// This file is automatically generated by Swagger Codegen.
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class CatTests
+ {
+ private Cat instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ instance = new Cat();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of Cat
+ ///
+ [Test]
+ public void CatInstanceTest()
+ {
+ Assert.IsInstanceOf (instance, "instance is a Cat");
+ }
+
+ ///
+ /// Test the property 'ClassName'
+ ///
+ [Test]
+ public void ClassNameTest()
+ {
+ // TODO: unit test for the property 'ClassName'
+ }
+ ///
+ /// Test the property 'Declawed'
+ ///
+ [Test]
+ public void DeclawedTest()
+ {
+ // TODO: unit test for the property 'Declawed'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs
new file mode 100644
index 00000000000..33aa6cb51af
--- /dev/null
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/DogTests.cs
@@ -0,0 +1,72 @@
+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
+{
+ ///
+ /// Class for testing Dog
+ ///
+ ///
+ /// This file is automatically generated by Swagger Codegen.
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class DogTests
+ {
+ private Dog instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ instance = new Dog();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of Dog
+ ///
+ [Test]
+ public void DogInstanceTest()
+ {
+ Assert.IsInstanceOf (instance, "instance is a Dog");
+ }
+
+ ///
+ /// Test the property 'ClassName'
+ ///
+ [Test]
+ public void ClassNameTest()
+ {
+ // TODO: unit test for the property 'ClassName'
+ }
+ ///
+ /// Test the property 'Breed'
+ ///
+ [Test]
+ public void BreedTest()
+ {
+ // TODO: unit test for the property 'Breed'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs
new file mode 100644
index 00000000000..a6eec919779
--- /dev/null
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/FormatTestTests.cs
@@ -0,0 +1,152 @@
+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
+{
+ ///
+ /// Class for testing FormatTest
+ ///
+ ///
+ /// This file is automatically generated by Swagger Codegen.
+ /// Please update the test case below to test the model.
+ ///
+ [TestFixture]
+ public class FormatTestTests
+ {
+ private FormatTest instance;
+
+ ///
+ /// Setup before each test
+ ///
+ [SetUp]
+ public void Init()
+ {
+ instance = new FormatTest();
+ }
+
+ ///
+ /// Clean up after each test
+ ///
+ [TearDown]
+ public void Cleanup()
+ {
+
+ }
+
+ ///
+ /// Test an instance of FormatTest
+ ///
+ [Test]
+ public void FormatTestInstanceTest()
+ {
+ Assert.IsInstanceOf (instance, "instance is a FormatTest");
+ }
+
+ ///
+ /// Test the property 'Integer'
+ ///
+ [Test]
+ public void IntegerTest()
+ {
+ // TODO: unit test for the property 'Integer'
+ }
+ ///
+ /// Test the property 'Int32'
+ ///
+ [Test]
+ public void Int32Test()
+ {
+ // TODO: unit test for the property 'Int32'
+ }
+ ///
+ /// Test the property 'Int64'
+ ///
+ [Test]
+ public void Int64Test()
+ {
+ // TODO: unit test for the property 'Int64'
+ }
+ ///
+ /// Test the property 'Number'
+ ///
+ [Test]
+ public void NumberTest()
+ {
+ // TODO: unit test for the property 'Number'
+ }
+ ///
+ /// Test the property '_Float'
+ ///
+ [Test]
+ public void _FloatTest()
+ {
+ // TODO: unit test for the property '_Float'
+ }
+ ///
+ /// Test the property '_Double'
+ ///
+ [Test]
+ public void _DoubleTest()
+ {
+ // TODO: unit test for the property '_Double'
+ }
+ ///
+ /// Test the property '_String'
+ ///
+ [Test]
+ public void _StringTest()
+ {
+ // TODO: unit test for the property '_String'
+ }
+ ///
+ /// Test the property '_Byte'
+ ///
+ [Test]
+ public void _ByteTest()
+ {
+ // TODO: unit test for the property '_Byte'
+ }
+ ///
+ /// Test the property 'Binary'
+ ///
+ [Test]
+ public void BinaryTest()
+ {
+ // TODO: unit test for the property 'Binary'
+ }
+ ///
+ /// Test the property 'Date'
+ ///
+ [Test]
+ public void DateTest()
+ {
+ // TODO: unit test for the property 'Date'
+ }
+ ///
+ /// Test the property 'DateTime'
+ ///
+ [Test]
+ public void DateTimeTest()
+ {
+ // TODO: unit test for the property 'DateTime'
+ }
+ ///
+ /// Test the property 'Password'
+ ///
+ [Test]
+ public void PasswordTest()
+ {
+ // TODO: unit test for the property 'Password'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs
index 4e03a3ef4f9..a4930b02df3 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/InlineResponse200Tests.cs
@@ -51,12 +51,20 @@ namespace IO.Swagger.Test
}
///
- /// Test the property 'Tags'
+ /// Test the property 'PhotoUrls'
///
[Test]
- public void TagsTest()
+ public void PhotoUrlsTest()
{
- // TODO: unit test for the property 'Tags'
+ // TODO: unit test for the property 'PhotoUrls'
+ }
+ ///
+ /// Test the property 'Name'
+ ///
+ [Test]
+ public void NameTest()
+ {
+ // TODO: unit test for the property 'Name'
}
///
/// Test the property 'Id'
@@ -75,6 +83,14 @@ namespace IO.Swagger.Test
// TODO: unit test for the property 'Category'
}
///
+ /// Test the property 'Tags'
+ ///
+ [Test]
+ public void TagsTest()
+ {
+ // TODO: unit test for the property 'Tags'
+ }
+ ///
/// Test the property 'Status'
///
[Test]
@@ -82,22 +98,6 @@ namespace IO.Swagger.Test
{
// TODO: unit test for the property 'Status'
}
- ///
- /// Test the property 'Name'
- ///
- [Test]
- public void NameTest()
- {
- // TODO: unit test for the property 'Name'
- }
- ///
- /// Test the property 'PhotoUrls'
- ///
- [Test]
- public void PhotoUrlsTest()
- {
- // TODO: unit test for the property 'PhotoUrls'
- }
}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs
index 67d8241ee91..76a0dac0944 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/PetApiTests.cs
@@ -185,7 +185,7 @@ string status = null; // TODO: replace null with proper value
// TODO: add unit test for the method 'UploadFile'
long? petId = null; // TODO: replace null with proper value
string additionalMetadata = null; // TODO: replace null with proper value
-Stream file = null; // TODO: replace null with proper value
+System.IO.Stream file = null; // TODO: replace null with proper value
instance.UploadFile(petId, additionalMetadata, file);
}
diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs
index 0ae16d2122f..4b347121cb0 100644
--- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs
+++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Api/PetApi.cs
@@ -1,5 +1,4 @@
using System;
-using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -242,7 +241,7 @@ namespace IO.Swagger.Api
/// Additional data to pass to server (optional)
/// file to upload (optional)
///
- void UploadFile (long? petId, string additionalMetadata = null, Stream file = null);
+ void UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null);
///
/// uploads an image
@@ -255,7 +254,7 @@ namespace IO.Swagger.Api
/// Additional data to pass to server (optional)
/// file to upload (optional)
/// ApiResponse of Object(void)
- ApiResponse