8
8
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
*/
10
10
11
- using System ;
12
- using System . IO ;
13
- using System . Collections . Generic ;
14
- using System . Collections . ObjectModel ;
15
- using System . Linq ;
16
- using System . Reflection ;
17
- using RestSharp ;
18
11
using NUnit . Framework ;
19
-
20
- using Aspose . Cells . Cloud . SDK . Client ;
21
12
using Aspose . Cells . Cloud . SDK . Api ;
22
13
using Aspose . Cells . Cloud . SDK . Model ;
23
14
@@ -33,14 +24,14 @@ namespace Aspose.Cells.Cloud.SDK.Test
33
24
[ TestFixture ]
34
25
public class CellsAutoFilterApiTests : CellsBaseTest
35
26
{
36
- private CellsAutoFilterApi instance ;
27
+ private CellsApi instance ;
37
28
/// <summary>
38
29
/// Setup before each unit test
39
30
/// </summary>
40
31
[ SetUp ]
41
32
public void Init ( )
42
33
{
43
- instance = new CellsAutoFilterApi ( GetConfiguration ( ) ) ;
34
+ instance = new CellsApi ( clientId , clientSecret ) ; ;
44
35
}
45
36
46
37
/// <summary>
@@ -52,17 +43,7 @@ public void Cleanup()
52
43
53
44
}
54
45
55
- /// <summary>
56
- /// Test an instance of CellsAutoFilterApi
57
- /// </summary>
58
- [ Test ]
59
- public void InstanceTest ( )
60
- {
61
- // TODO uncomment below to test 'IsInstanceOfType' CellsAutoFilterApi
62
- Assert . IsInstanceOf ( typeof ( CellsAutoFilterApi ) , instance , "instance is a CellsAutoFilterApi" ) ;
63
- }
64
-
65
-
46
+
66
47
/// <summary>
67
48
/// Test CellsAutoFilterDeleteWorksheetDateFilter
68
49
/// </summary>
@@ -81,9 +62,9 @@ public void CellsAutoFilterDeleteWorksheetDateFilterTest()
81
62
int ? minute = 1 ;
82
63
int ? second = 1 ;
83
64
string folder = TEMPFOLDER ;
84
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
65
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
85
66
var response = instance . CellsAutoFilterDeleteWorksheetDateFilter ( name , sheetName , fieldIndex , dateTimeGroupingType , year , month , day , hour , minute , second , folder ) ;
86
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
67
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
87
68
Assert . AreEqual ( response . Code , 200 ) ;
88
69
}
89
70
@@ -99,9 +80,9 @@ public void CellsAutoFilterDeleteWorksheetFilterTest()
99
80
int ? fieldIndex = 1 ;
100
81
string criteria = "test" ;
101
82
string folder = TEMPFOLDER ;
102
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
83
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
103
84
var response = instance . CellsAutoFilterDeleteWorksheetFilter ( name , sheetName , fieldIndex , criteria , folder ) ;
104
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
85
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
105
86
Assert . AreEqual ( response . Code , 200 ) ;
106
87
}
107
88
@@ -115,7 +96,7 @@ public void CellsAutoFilterGetWorksheetAutoFilterTest()
115
96
string name = BOOK1 ;
116
97
string sheetName = SHEET1 ;
117
98
string folder = TEMPFOLDER ;
118
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
99
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
119
100
var response = instance . CellsAutoFilterGetWorksheetAutoFilter ( name , sheetName , folder ) ;
120
101
Assert . IsInstanceOf < AutoFilterResponse > ( response , "response is AutoFilterResponse" ) ;
121
102
Assert . AreEqual ( response . Code , 200 ) ;
@@ -131,9 +112,9 @@ public void CellsAutoFilterPostWorksheetAutoFilterRefreshTest()
131
112
string name = BOOK1 ;
132
113
string sheetName = SHEET1 ;
133
114
string folder = TEMPFOLDER ;
134
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
115
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
135
116
var response = instance . CellsAutoFilterPostWorksheetAutoFilterRefresh ( name , sheetName , folder ) ;
136
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
117
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
137
118
Assert . AreEqual ( response . Code , 200 ) ;
138
119
}
139
120
@@ -148,9 +129,9 @@ public void CellsAutoFilterPostWorksheetMatchBlanksTest()
148
129
string sheetName = SHEET1 ;
149
130
int ? fieldIndex = 0 ;
150
131
string folder = TEMPFOLDER ;
151
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
132
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
152
133
var response = instance . CellsAutoFilterPostWorksheetMatchBlanks ( name , sheetName , fieldIndex , folder ) ;
153
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
134
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
154
135
Assert . AreEqual ( response . Code , 200 ) ;
155
136
}
156
137
@@ -165,9 +146,9 @@ public void CellsAutoFilterPostWorksheetMatchNonBlanksTest()
165
146
string sheetName = SHEET1 ;
166
147
int ? fieldIndex = 0 ;
167
148
string folder = TEMPFOLDER ;
168
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
149
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
169
150
var response = instance . CellsAutoFilterPostWorksheetMatchNonBlanks ( name , sheetName , fieldIndex , folder ) ;
170
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
151
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
171
152
Assert . AreEqual ( response . Code , 200 ) ;
172
153
}
173
154
@@ -193,9 +174,9 @@ public void CellsAutoFilterPutWorksheetColorFilterTest()
193
174
bool ? matchBlanks = true ;
194
175
bool ? refresh = true ;
195
176
string folder = TEMPFOLDER ;
196
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
177
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
197
178
var response = instance . CellsAutoFilterPutWorksheetColorFilter ( name , sheetName , range , fieldIndex , colorFilter , matchBlanks , refresh , folder ) ;
198
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
179
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
199
180
Assert . AreEqual ( response . Code , 200 ) ;
200
181
}
201
182
@@ -218,9 +199,9 @@ public void CellsAutoFilterPutWorksheetCustomFilterTest()
218
199
bool ? matchBlanks = true ;
219
200
bool ? refresh = false ;
220
201
string folder = TEMPFOLDER ;
221
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
202
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
222
203
var response = instance . CellsAutoFilterPutWorksheetCustomFilter ( name , sheetName , range , fieldIndex , operatorType1 , criteria1 , isAnd , operatorType2 , criteria2 , matchBlanks , refresh , folder ) ;
223
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
204
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
224
205
Assert . AreEqual ( response . Code , 200 ) ;
225
206
}
226
207
@@ -245,9 +226,9 @@ public void CellsAutoFilterPutWorksheetDateFilterTest()
245
226
bool ? matchBlanks = true ;
246
227
bool ? refresh = true ;
247
228
string folder = TEMPFOLDER ;
248
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
229
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
249
230
var response = instance . CellsAutoFilterPutWorksheetDateFilter ( name , sheetName , range , fieldIndex , dateTimeGroupingType , year , month , day , hour , minute , second , matchBlanks , refresh , folder ) ;
250
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
231
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
251
232
Assert . AreEqual ( response . Code , 200 ) ;
252
233
}
253
234
@@ -266,9 +247,9 @@ public void CellsAutoFilterPutWorksheetDynamicFilterTest()
266
247
bool ? matchBlanks = true ;
267
248
bool ? refresh = true ;
268
249
string folder = TEMPFOLDER ;
269
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
250
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
270
251
var response = instance . CellsAutoFilterPutWorksheetDynamicFilter ( name , sheetName , range , fieldIndex , dynamicFilterType , matchBlanks , refresh , folder ) ;
271
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
252
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
272
253
Assert . AreEqual ( response . Code , 200 ) ;
273
254
}
274
255
@@ -287,9 +268,9 @@ public void CellsAutoFilterPutWorksheetFilterTest()
287
268
bool ? matchBlanks = true ;
288
269
bool ? refresh = true ;
289
270
string folder = TEMPFOLDER ;
290
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
271
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
291
272
var response = instance . CellsAutoFilterPutWorksheetFilter ( name , sheetName , range , fieldIndex , criteria , matchBlanks , refresh , folder ) ;
292
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
273
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
293
274
Assert . AreEqual ( response . Code , 200 ) ;
294
275
}
295
276
@@ -310,9 +291,9 @@ public void CellsAutoFilterPutWorksheetFilterTop10Test()
310
291
bool ? matchBlanks = null ;
311
292
bool ? refresh = null ;
312
293
string folder = TEMPFOLDER ;
313
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
294
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
314
295
var response = instance . CellsAutoFilterPutWorksheetFilterTop10 ( name , sheetName , range , fieldIndex , isTop , isPercent , itemCount , matchBlanks , refresh , folder ) ;
315
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
296
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
316
297
Assert . AreEqual ( response . Code , 200 ) ;
317
298
}
318
299
@@ -332,9 +313,9 @@ public void CellsAutoFilterPutWorksheetIconFilterTest()
332
313
bool ? matchBlanks = null ;
333
314
bool ? refresh = null ;
334
315
string folder = TEMPFOLDER ;
335
- UpdateDataFile ( TEMPFOLDER , BOOK1 ) ;
316
+ UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
336
317
var response = instance . CellsAutoFilterPutWorksheetIconFilter ( name , sheetName , range , fieldIndex , iconSetType , iconId , matchBlanks , refresh , folder ) ;
337
- Assert . IsInstanceOf < SaaSposeResponse > ( response , "response is SaaSposeResponse " ) ;
318
+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is CellsCloudResponse " ) ;
338
319
Assert . AreEqual ( response . Code , 200 ) ;
339
320
}
340
321
0 commit comments