Skip to content

Commit

Permalink
20211130 update : add test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
roywangaspose committed Nov 29, 2021
1 parent cdba188 commit a7a98a1
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Web API Swagger specification
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/


package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.client.ApiClient;
import com.aspose.cloud.cells.client.ApiException;
import com.aspose.cloud.cells.client.Configuration;
import com.aspose.cloud.cells.model.FilesResult;
import org.junit.Test;
import org.junit.Ignore;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* API tests for CellsShapesApi
*/

public class CellsCompressApiTest {

private LiteCellsApi api ;

private String BOOK1 = "Book1.xlsx";
private String MYDOC = "myDocument.xlsx";
private String AssemblyTestXlsx = "assemblytest.xlsx";
private String DataSourceXlsx = "datasource.xlsx";
private String PivTestFile = "TestCase.xlsx";
private String TEMPFOLDER = "JavaTest";
private String SHEET1 = "Sheet1";
private String SHEET2 = "Sheet2";
private String SHEET3 = "Sheet3";
private String SHEET4 = "Sheet4";
private String SHEET5 = "Sheet5";
private String SHEET6 = "Sheet6";
private String SHEET7 = "Sheet7";
private String SHEET8 = "Sheet8";
private String CellName = "A1";
private String RANGE = "A1:C10";
private String CELLAREA = "A1:C10";

public CellsCompressApiTest(){
try {
api = new LiteCellsApi(CellsApiUtil.GetClientId(),CellsApiUtil.GetClientSecret(),CellsApiUtil.GetAPIVersion(),CellsApiUtil.GetBaseUrl());
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

/**
* Delete a shape in worksheet
*
*
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void cellsPostCompressApiTest() throws ApiException {

HashMap<String,File> fileMap = new HashMap<String,File>();
fileMap.put(AssemblyTestXlsx ,CellsApiUtil.GetFileHolder(AssemblyTestXlsx) );
fileMap.put(DataSourceXlsx ,CellsApiUtil.GetFileHolder(DataSourceXlsx) );
FilesResult response = api.postCompress(fileMap, 88);

// TODO: test validations
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* Web API Swagger specification
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/


package com.aspose.cloud.cells.api;
import com.aspose.cloud.cells.client.ApiClient;
import com.aspose.cloud.cells.client.ApiException;
import com.aspose.cloud.cells.client.Configuration;
import com.aspose.cloud.cells.model.FilesResult;
import org.junit.Test;
import org.junit.Ignore;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* API tests for CellsShapesApi
*/

public class CellsReplaceApiTest {

private LiteCellsApi api ;

private String BOOK1 = "Book1.xlsx";
private String MYDOC = "myDocument.xlsx";
private String AssemblyTestXlsx = "assemblytest.xlsx";
private String DataSourceXlsx = "datasource.xlsx";
private String PivTestFile = "TestCase.xlsx";
private String TEMPFOLDER = "JavaTest";
private String SHEET1 = "Sheet1";
private String SHEET2 = "Sheet2";
private String SHEET3 = "Sheet3";
private String SHEET4 = "Sheet4";
private String SHEET5 = "Sheet5";
private String SHEET6 = "Sheet6";
private String SHEET7 = "Sheet7";
private String SHEET8 = "Sheet8";
private String CellName = "A1";
private String RANGE = "A1:C10";
private String CELLAREA = "A1:C10";

public CellsReplaceApiTest(){
try {
api = new LiteCellsApi(CellsApiUtil.GetClientId(),CellsApiUtil.GetClientSecret(),CellsApiUtil.GetAPIVersion(),CellsApiUtil.GetBaseUrl());
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


@Test
public void cellsPostRepleaceApiTest() throws ApiException {

HashMap<String,File> fileMap = new HashMap<String,File>();
fileMap.put(AssemblyTestXlsx ,CellsApiUtil.GetFileHolder(AssemblyTestXlsx) );
fileMap.put(DataSourceXlsx ,CellsApiUtil.GetFileHolder(DataSourceXlsx) );
FilesResult response = api.postReplace(fileMap,"1","aspose.cells cloud",null,null);

// TODO: test validations
}



}

0 comments on commit a7a98a1

Please sign in to comment.