Skip to content

Commit a681042

Browse files
committed
Release Aspose.Cells Cloud SDK 24.9.0
1 parent 0340ade commit a681042

37 files changed

+666
-106
lines changed

Aspose.Cells.Cloud.SDK.Examples/ExampleDeleteFile.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

Aspose.Cells.Cloud.SDK.Examples/ExampleMoveFile.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Aspose.Cells.Cloud.SDK.Api;
2+
using Aspose.Cells.Cloud.SDK.Model;
3+
using Aspose.Cells.Cloud.SDK.Request;
4+
using System;
5+
using System.IO;
6+
using System.Collections.Generic;
7+
8+
CellsApi cellsApi = new CellsApi("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
9+
string remoteFolder = "TestData/In";
10+
11+
string localName = "BookText.xlsx";
12+
string remoteName = "BookText.xlsx";
13+
14+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
15+
16+
var addTextOptionsDataSource = new DataSource()
17+
{
18+
DataSourceType = "CloudFileSystem",
19+
DataPath = "BookText.xlsx"
20+
};
21+
var addTextOptions = new AddTextOptions()
22+
{
23+
DataSource = addTextOptionsDataSource,
24+
Text = "Aspose.Cells Cloud is an excellent product.",
25+
Worksheet = "202401",
26+
SelectPoistion = "AtTheBeginning",
27+
SkipEmptyCells = true
28+
};
29+
var request = new PostAddTextContentRequest(
30+
addTextOptions: addTextOptions
31+
);
32+
this.CellsApi.PostAddTextContent(request);
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Aspose.Cells.Cloud.SDK.Api;
2+
using Aspose.Cells.Cloud.SDK.Model;
3+
using Aspose.Cells.Cloud.SDK.Request;
4+
using System;
5+
using System.IO;
6+
using System.Collections.Generic;
7+
8+
CellsApi cellsApi = new CellsApi("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
9+
string remoteFolder = "TestData/In";
10+
11+
string localName = "BookText.xlsx";
12+
string remoteName = "BookText.xlsx";
13+
14+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
15+
16+
var trimContentOptionsDataSource = new DataSource()
17+
{
18+
DataSourceType = "CloudFileSystem",
19+
DataPath = "BookText.xlsx"
20+
};
21+
var trimContentOptionsScopeOptions = new ScopeOptions()
22+
{
23+
Scope = "EntireWorkbook"
24+
};
25+
var trimContentOptions = new TrimContentOptions()
26+
{
27+
DataSource = trimContentOptionsDataSource,
28+
TrimLeading = true,
29+
TrimTrailing = true,
30+
TrimSpaceBetweenWordTo1 = true,
31+
RemoveAllLineBreaks = true,
32+
ScopeOptions = trimContentOptionsScopeOptions
33+
};
34+
var request = new PostTrimContentRequest(
35+
trimContentOptions: trimContentOptions
36+
);
37+
this.CellsApi.PostTrimContent(request);
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Aspose.Cells.Cloud.SDK.Api;
2+
using Aspose.Cells.Cloud.SDK.Model;
3+
using Aspose.Cells.Cloud.SDK.Request;
4+
using System;
5+
using System.IO;
6+
using System.Collections.Generic;
7+
8+
CellsApi cellsApi = new CellsApi("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
9+
string remoteFolder = "TestData/In";
10+
11+
string localName = "BookText.xlsx";
12+
string remoteName = "BookText.xlsx";
13+
14+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
15+
16+
var wordCaseOptionsDataSource = new DataSource()
17+
{
18+
DataSourceType = "CloudFileSystem",
19+
DataPath = "BookText.xlsx"
20+
};
21+
var wordCaseOptionsScopeOptions = new ScopeOptions()
22+
{
23+
Scope = "EntireWorkbook"
24+
};
25+
var wordCaseOptions = new WordCaseOptions()
26+
{
27+
DataSource = wordCaseOptionsDataSource,
28+
WordCaseType = "None",
29+
ScopeOptions = wordCaseOptionsScopeOptions
30+
};
31+
var request = new PostUpdateWordCaseRequest(
32+
wordCaseOptions: wordCaseOptions
33+
);
34+
this.CellsApi.PostUpdateWordCase(request);

Aspose.Cells.Cloud.SDK.Examples/ExamplePostWorkbookDataDeduplication.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313

1414
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
1515

16+
var deduplicationRegionRanges = new List<Range>()
17+
{
18+
};
1619
var deduplicationRegion = new DeduplicationRegion()
1720
{
21+
Ranges = deduplicationRegionRanges
1822
};
1923
var request = new PostWorkbookDataDeduplicationRequest(
2024
name: remoteName,

Aspose.Cells.Cloud.SDK.Test/Api/CellsStatusControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void TestGetCellsCloudServicesHealthCheck()
5252
var request = new GetCellsCloudServicesHealthCheckRequest(
5353
);
5454
var actual = this.CellsApi.GetCellsCloudServicesHealthCheck(request);
55-
Assert.AreEqual("{\"Status\":\"Cells Cloud(v24.1.0) is working fine!\"}", actual);
55+
Assert.AreEqual("{\"Status\":\"Cells Cloud(v24.9.0) is working fine!\"}", actual);
5656
}
5757

5858
/// <summary>

Aspose.Cells.Cloud.SDK.Test/Api/DataProcessingControllerTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,12 @@ public void TestPostWorkbookDataDeduplication()
8686

8787
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
8888

89+
var deduplicationRegionRanges = new List<Range>()
90+
{
91+
};
8992
var deduplicationRegion = new DeduplicationRegion()
9093
{
94+
Ranges = deduplicationRegionRanges
9195
};
9296
var request = new PostWorkbookDataDeduplicationRequest(
9397
name: remoteName,

Aspose.Cells.Cloud.SDK.Test/Api/FileControllerTests.cs

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -102,47 +102,5 @@ public void TestCopyFile()
102102
);
103103
this.CellsApi.CopyFile(request);
104104
}
105-
106-
/// <summary>
107-
/// Test for MoveFile of FileController.
108-
/// </summary>
109-
[TestCategory(ProductName)]
110-
[TestMethod]
111-
public void TestMoveFile()
112-
{
113-
string localName = "Book1.xlsx";
114-
string remoteName = "Book1.xlsx";
115-
116-
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
117-
118-
var request = new MoveFileRequest(
119-
srcPath: remoteFolder + "/" + remoteName,
120-
destPath: "OutResult/" + remoteName,
121-
srcStorageName: "",
122-
destStorageName: "",
123-
versionId: ""
124-
);
125-
this.CellsApi.MoveFile(request);
126-
}
127-
128-
/// <summary>
129-
/// Test for DeleteFile of FileController.
130-
/// </summary>
131-
[TestCategory(ProductName)]
132-
[TestMethod]
133-
public void TestDeleteFile()
134-
{
135-
string localName = "Book1.xlsx";
136-
string remoteName = "Book1.xlsx";
137-
138-
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
139-
140-
var request = new DeleteFileRequest(
141-
path: remoteFolder + "/" + remoteName,
142-
storageName: "",
143-
versionId: ""
144-
);
145-
this.CellsApi.DeleteFile(request);
146-
}
147105
}
148106
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// --------------------------------------------------------------------------------------------------------------------
2+
// <copyright company="Aspose" file="TextProcessingControllerTests.cs">
3+
// Copyright (c) 2024 Aspose.Cells Cloud
4+
// </copyright>
5+
// <summary>
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
//
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
//
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
// SOFTWARE.
23+
// </summary>
24+
// --------------------------------------------------------------------------------------------------------------------
25+
26+
namespace Aspose.Cells.Cloud.SDK.Tests.Api.Api
27+
{
28+
using Microsoft.VisualStudio.TestTools.UnitTesting;
29+
using Aspose.Cells.Cloud.SDK.Model;
30+
using Aspose.Cells.Cloud.SDK.Request;
31+
using System.Collections.Generic;
32+
/// <summary>
33+
/// Test case of TextProcessingController.
34+
/// </summary>
35+
[TestClass]
36+
public class TextProcessingControllerTests : CellsTestCommon
37+
{
38+
private readonly string remoteFolder = "TestData/In";
39+
40+
/// <summary>
41+
/// Test for PostAddTextContent of TextProcessingController.
42+
/// </summary>
43+
[TestCategory(ProductName)]
44+
[TestMethod]
45+
public void TestPostAddTextContent()
46+
{
47+
string localName = "BookText.xlsx";
48+
string remoteName = "BookText.xlsx";
49+
50+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
51+
52+
var addTextOptionsDataSource = new DataSource()
53+
{
54+
DataSourceType = "CloudFileSystem",
55+
DataPath = "BookText.xlsx"
56+
};
57+
var addTextOptions = new AddTextOptions()
58+
{
59+
DataSource = addTextOptionsDataSource,
60+
Text = "Aspose.Cells Cloud is an excellent product.",
61+
Worksheet = "202401",
62+
SelectPoistion = "AtTheBeginning",
63+
SkipEmptyCells = true
64+
};
65+
var request = new PostAddTextContentRequest(
66+
addTextOptions: addTextOptions
67+
);
68+
var actual = this.CellsApi.PostAddTextContent(request);
69+
Assert.IsNotNull(actual);
70+
}
71+
72+
/// <summary>
73+
/// Test for PostTrimContent of TextProcessingController.
74+
/// </summary>
75+
[TestCategory(ProductName)]
76+
[TestMethod]
77+
public void TestPostTrimContent()
78+
{
79+
string localName = "BookText.xlsx";
80+
string remoteName = "BookText.xlsx";
81+
82+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
83+
84+
var trimContentOptionsDataSource = new DataSource()
85+
{
86+
DataSourceType = "CloudFileSystem",
87+
DataPath = "BookText.xlsx"
88+
};
89+
var trimContentOptionsScopeOptions = new ScopeOptions()
90+
{
91+
Scope = "EntireWorkbook"
92+
};
93+
var trimContentOptions = new TrimContentOptions()
94+
{
95+
DataSource = trimContentOptionsDataSource,
96+
TrimLeading = true,
97+
TrimTrailing = true,
98+
TrimSpaceBetweenWordTo1 = true,
99+
RemoveAllLineBreaks = true,
100+
ScopeOptions = trimContentOptionsScopeOptions
101+
};
102+
var request = new PostTrimContentRequest(
103+
trimContentOptions: trimContentOptions
104+
);
105+
var actual = this.CellsApi.PostTrimContent(request);
106+
Assert.IsNotNull(actual);
107+
}
108+
109+
/// <summary>
110+
/// Test for PostUpdateWordCase of TextProcessingController.
111+
/// </summary>
112+
[TestCategory(ProductName)]
113+
[TestMethod]
114+
public void TestPostUpdateWordCase()
115+
{
116+
string localName = "BookText.xlsx";
117+
string remoteName = "BookText.xlsx";
118+
119+
this.UploadFile( localName, remoteFolder + "/" + remoteName, "");
120+
121+
var wordCaseOptionsDataSource = new DataSource()
122+
{
123+
DataSourceType = "CloudFileSystem",
124+
DataPath = "BookText.xlsx"
125+
};
126+
var wordCaseOptionsScopeOptions = new ScopeOptions()
127+
{
128+
Scope = "EntireWorkbook"
129+
};
130+
var wordCaseOptions = new WordCaseOptions()
131+
{
132+
DataSource = wordCaseOptionsDataSource,
133+
WordCaseType = "None",
134+
ScopeOptions = wordCaseOptionsScopeOptions
135+
};
136+
var request = new PostUpdateWordCaseRequest(
137+
wordCaseOptions: wordCaseOptions
138+
);
139+
var actual = this.CellsApi.PostUpdateWordCase(request);
140+
Assert.IsNotNull(actual);
141+
}
142+
}
143+
}

0 commit comments

Comments
 (0)