|
| 1 | +/* |
| 2 | + * Web API Swagger specification |
| 3 | + * |
| 4 | + * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 5 | + * |
| 6 | + * OpenAPI spec version: 1.0 |
| 7 | + * |
| 8 | + * Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 9 | + */ |
| 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 | +using NUnit.Framework; |
| 19 | + |
| 20 | +using Aspose.Cells.Cloud.SDK.Client; |
| 21 | +using Aspose.Cells.Cloud.SDK.Api; |
| 22 | +using Aspose.Cells.Cloud.SDK.Model; |
| 23 | + |
| 24 | +namespace Aspose.Cells.Cloud.SDK.Test |
| 25 | +{ |
| 26 | + /// <summary> |
| 27 | + /// Class for testing CellsChartsApi |
| 28 | + /// </summary> |
| 29 | + /// <remarks> |
| 30 | + /// This file is automatically generated by Swagger Codegen. |
| 31 | + /// Please update the test case below to test the API endpoint. |
| 32 | + /// </remarks> |
| 33 | + [TestFixture] |
| 34 | + public class CellsChartsAxisApiTests:CellsBaseTest |
| 35 | + { |
| 36 | + private CellsApi instance; |
| 37 | + /// <summary> |
| 38 | + /// Setup before each unit test |
| 39 | + /// </summary> |
| 40 | + [SetUp] |
| 41 | + public void Init() |
| 42 | + { |
| 43 | + instance = new CellsApi(clientId, clientSecret, apiVersion, testbaseurl); |
| 44 | + } |
| 45 | + |
| 46 | + /// <summary> |
| 47 | + /// Clean up after each unit test |
| 48 | + /// </summary> |
| 49 | + [TearDown] |
| 50 | + public void Cleanup() |
| 51 | + { |
| 52 | + |
| 53 | + } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// Test CellsChartsGetAxis |
| 57 | + /// </summary> |
| 58 | + [Test] |
| 59 | + public void CellsChartsGetAxis() |
| 60 | + { |
| 61 | + // TODO uncomment below to test the method and replace null with proper value |
| 62 | + string name = BOOK1; |
| 63 | + string sheetName = SHEET4; |
| 64 | + int? chartIndex = 0; |
| 65 | + string folder = TEMPFOLDER; |
| 66 | + UpdateDataFile(instance,folder, name); |
| 67 | + var response = instance.CellsChartsGetChartCategoryAxis(name, sheetName, chartIndex, folder); |
| 68 | + Assert.IsInstanceOf<AxisResponse>(response, "response is AxisResponse"); |
| 69 | + Assert.AreEqual(response.Code, 200); |
| 70 | + response = instance.CellsChartsGetChartSecondCategoryAxis(name, sheetName, chartIndex, folder); |
| 71 | + Assert.IsInstanceOf<AxisResponse>(response, "response is AxisResponse"); |
| 72 | + Assert.AreEqual(response.Code, 200); |
| 73 | + response = instance.CellsChartsGetChartSecondValueAxis(name, sheetName, chartIndex, folder); |
| 74 | + Assert.IsInstanceOf<AxisResponse>(response, "response is AxisResponse"); |
| 75 | + Assert.AreEqual(response.Code, 200); |
| 76 | + response = instance.CellsChartsGetChartValueAxis(name, sheetName, chartIndex, folder); |
| 77 | + Assert.IsInstanceOf<AxisResponse>(response, "response is AxisResponse"); |
| 78 | + Assert.AreEqual(response.Code, 200); |
| 79 | + response = instance.CellsChartsGetChartSeriesAxis(name, sheetName, chartIndex, folder); |
| 80 | + Assert.IsInstanceOf<AxisResponse>(response, "response is AxisResponse"); |
| 81 | + Assert.AreEqual(response.Code, 200); |
| 82 | + |
| 83 | + } |
| 84 | + [Test] |
| 85 | + public void CellsChartsUpdateAxis() |
| 86 | + { |
| 87 | + // TODO uncomment below to test the method and replace null with proper value |
| 88 | + string name = BOOK1; |
| 89 | + string sheetName = SHEET4; |
| 90 | + int? chartIndex = 0; |
| 91 | + string folder = TEMPFOLDER; |
| 92 | + UpdateDataFile(instance, folder, name); |
| 93 | + |
| 94 | + Axis axis = new Axis(); |
| 95 | + axis.CrossType = "Minimum"; |
| 96 | + axis.CategoryType = "CategoryScale"; |
| 97 | + axis.MinValue = 10; |
| 98 | + var response = instance.CellsChartsPostChartCategoryAxis(name, sheetName, chartIndex, axis, folder); |
| 99 | + Assert.IsInstanceOf<CellsCloudResponse>(response, "response is AxisResponse"); |
| 100 | + Assert.AreEqual(response.Code, 200); |
| 101 | + response = instance.CellsChartsPostChartSecondCategoryAxis(name, sheetName, chartIndex, axis, folder); |
| 102 | + Assert.IsInstanceOf<CellsCloudResponse>(response, "response is AxisResponse"); |
| 103 | + Assert.AreEqual(response.Code, 200); |
| 104 | + response = instance.CellsChartsPostChartSecondValueAxis(name, sheetName, chartIndex, axis, folder); |
| 105 | + Assert.IsInstanceOf<CellsCloudResponse>(response, "response is AxisResponse"); |
| 106 | + Assert.AreEqual(response.Code, 200); |
| 107 | + response = instance.CellsChartsPostChartValueAxis(name, sheetName, chartIndex, axis, folder); |
| 108 | + Assert.IsInstanceOf<CellsCloudResponse>(response, "response is AxisResponse"); |
| 109 | + Assert.AreEqual(response.Code, 200); |
| 110 | + response = instance.CellsChartsPostChartSeriesAxis(name, sheetName, chartIndex, axis, folder); |
| 111 | + Assert.IsInstanceOf<CellsCloudResponse>(response, "response is AxisResponse"); |
| 112 | + Assert.AreEqual(response.Code, 200); |
| 113 | + |
| 114 | + } |
| 115 | + } |
| 116 | + |
| 117 | +} |
0 commit comments