Skip to content

Commit 7af5d63

Browse files
author
Olivier Leonard
committed
Updated csharp samples
1 parent 299bcb0 commit 7af5d63

File tree

61 files changed

+424
-849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+424
-849
lines changed

samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
55
*
6-
* OpenAPI spec version: 1.0.0
6+
* The version of the OpenAPI document: 1.0.0
77
*
88
* Generated by: https://github.com/openapitools/openapi-generator.git
99
*/
@@ -58,8 +58,8 @@ public void Cleanup()
5858
[Test]
5959
public void InstanceTest()
6060
{
61-
// TODO uncomment below to test 'IsInstanceOfType' AnotherFakeApi
62-
//Assert.IsInstanceOfType(typeof(AnotherFakeApi), instance, "instance is a AnotherFakeApi");
61+
// TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi
62+
//Assert.IsInstanceOf(typeof(AnotherFakeApi), instance);
6363
}
6464

6565

@@ -72,7 +72,7 @@ public void Call123TestSpecialTagsTest()
7272
// TODO uncomment below to test the method and replace null with proper value
7373
//ModelClient body = null;
7474
//var response = instance.Call123TestSpecialTags(body);
75-
//Assert.IsInstanceOf<ModelClient> (response, "response is ModelClient");
75+
//Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient");
7676
}
7777

7878
}

samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
55
*
6-
* OpenAPI spec version: 1.0.0
6+
* The version of the OpenAPI document: 1.0.0
77
*
88
* Generated by: https://github.com/openapitools/openapi-generator.git
99
*/
@@ -58,8 +58,8 @@ public void Cleanup()
5858
[Test]
5959
public void InstanceTest()
6060
{
61-
// TODO uncomment below to test 'IsInstanceOfType' FakeApi
62-
//Assert.IsInstanceOfType(typeof(FakeApi), instance, "instance is a FakeApi");
61+
// TODO uncomment below to test 'IsInstanceOf' FakeApi
62+
//Assert.IsInstanceOf(typeof(FakeApi), instance);
6363
}
6464

6565

@@ -82,9 +82,9 @@ public void CreateXmlItemTest()
8282
public void FakeOuterBooleanSerializeTest()
8383
{
8484
// TODO uncomment below to test the method and replace null with proper value
85-
//bool? body = null;
85+
//bool body = null;
8686
//var response = instance.FakeOuterBooleanSerialize(body);
87-
//Assert.IsInstanceOf<bool?> (response, "response is bool?");
87+
//Assert.IsInstanceOf(typeof(bool), response, "response is bool");
8888
}
8989

9090
/// <summary>
@@ -96,7 +96,7 @@ public void FakeOuterCompositeSerializeTest()
9696
// TODO uncomment below to test the method and replace null with proper value
9797
//OuterComposite body = null;
9898
//var response = instance.FakeOuterCompositeSerialize(body);
99-
//Assert.IsInstanceOf<OuterComposite> (response, "response is OuterComposite");
99+
//Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite");
100100
}
101101

102102
/// <summary>
@@ -106,9 +106,9 @@ public void FakeOuterCompositeSerializeTest()
106106
public void FakeOuterNumberSerializeTest()
107107
{
108108
// TODO uncomment below to test the method and replace null with proper value
109-
//decimal? body = null;
109+
//decimal body = null;
110110
//var response = instance.FakeOuterNumberSerialize(body);
111-
//Assert.IsInstanceOf<decimal?> (response, "response is decimal?");
111+
//Assert.IsInstanceOf(typeof(decimal), response, "response is decimal");
112112
}
113113

114114
/// <summary>
@@ -120,7 +120,7 @@ public void FakeOuterStringSerializeTest()
120120
// TODO uncomment below to test the method and replace null with proper value
121121
//string body = null;
122122
//var response = instance.FakeOuterStringSerialize(body);
123-
//Assert.IsInstanceOf<string> (response, "response is string");
123+
//Assert.IsInstanceOf(typeof(string), response, "response is string");
124124
}
125125

126126
/// <summary>
@@ -157,7 +157,7 @@ public void TestClientModelTest()
157157
// TODO uncomment below to test the method and replace null with proper value
158158
//ModelClient body = null;
159159
//var response = instance.TestClientModel(body);
160-
//Assert.IsInstanceOf<ModelClient> (response, "response is ModelClient");
160+
//Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient");
161161
}
162162

163163
/// <summary>
@@ -167,18 +167,18 @@ public void TestClientModelTest()
167167
public void TestEndpointParametersTest()
168168
{
169169
// TODO uncomment below to test the method and replace null with proper value
170-
//decimal? number = null;
171-
//double? _double = null;
170+
//decimal number = null;
171+
//double _double = null;
172172
//string patternWithoutDelimiter = null;
173173
//byte[] _byte = null;
174-
//int? integer = null;
175-
//int? int32 = null;
176-
//long? int64 = null;
177-
//float? _float = null;
174+
//int integer = null;
175+
//int int32 = null;
176+
//long int64 = null;
177+
//float _float = null;
178178
//string _string = null;
179179
//System.IO.Stream binary = null;
180-
//DateTime? date = null;
181-
//DateTime? dateTime = null;
180+
//DateTime date = null;
181+
//DateTime dateTime = null;
182182
//string password = null;
183183
//string callback = null;
184184
//instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback);
@@ -196,8 +196,8 @@ public void TestEnumParametersTest()
196196
//string enumHeaderString = null;
197197
//List<string> enumQueryStringArray = null;
198198
//string enumQueryString = null;
199-
//int? enumQueryInteger = null;
200-
//double? enumQueryDouble = null;
199+
//int enumQueryInteger = null;
200+
//double enumQueryDouble = null;
201201
//List<string> enumFormStringArray = null;
202202
//string enumFormString = null;
203203
//instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
@@ -211,12 +211,12 @@ public void TestEnumParametersTest()
211211
public void TestGroupParametersTest()
212212
{
213213
// TODO uncomment below to test the method and replace null with proper value
214-
//int? requiredStringGroup = null;
215-
//bool? requiredBooleanGroup = null;
216-
//long? requiredInt64Group = null;
217-
//int? stringGroup = null;
218-
//bool? booleanGroup = null;
219-
//long? int64Group = null;
214+
//int requiredStringGroup = null;
215+
//bool requiredBooleanGroup = null;
216+
//long requiredInt64Group = null;
217+
//int stringGroup = null;
218+
//bool booleanGroup = null;
219+
//long int64Group = null;
220220
//instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
221221

222222
}
@@ -246,6 +246,22 @@ public void TestJsonFormDataTest()
246246

247247
}
248248

249+
/// <summary>
250+
/// Test TestQueryParameterCollectionFormat
251+
/// </summary>
252+
[Test]
253+
public void TestQueryParameterCollectionFormatTest()
254+
{
255+
// TODO uncomment below to test the method and replace null with proper value
256+
//List<string> pipe = null;
257+
//List<string> ioutil = null;
258+
//List<string> http = null;
259+
//List<string> url = null;
260+
//List<string> context = null;
261+
//instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
262+
263+
}
264+
249265
}
250266

251267
}

samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
55
*
6-
* OpenAPI spec version: 1.0.0
6+
* The version of the OpenAPI document: 1.0.0
77
*
88
* Generated by: https://github.com/openapitools/openapi-generator.git
99
*/
@@ -58,8 +58,8 @@ public void Cleanup()
5858
[Test]
5959
public void InstanceTest()
6060
{
61-
// TODO uncomment below to test 'IsInstanceOfType' FakeClassnameTags123Api
62-
//Assert.IsInstanceOfType(typeof(FakeClassnameTags123Api), instance, "instance is a FakeClassnameTags123Api");
61+
// TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api
62+
//Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance);
6363
}
6464

6565

@@ -72,7 +72,7 @@ public void TestClassnameTest()
7272
// TODO uncomment below to test the method and replace null with proper value
7373
//ModelClient body = null;
7474
//var response = instance.TestClassname(body);
75-
//Assert.IsInstanceOf<ModelClient> (response, "response is ModelClient");
75+
//Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient");
7676
}
7777

7878
}

0 commit comments

Comments
 (0)