aspose_cells_cloud 20.11 → 20.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/README.md +116 -0
- data/lib/aspose_cells_cloud.rb +296 -0
- data/lib/aspose_cells_cloud/api/cells_api.rb +19867 -0
- data/lib/aspose_cells_cloud/api_client.rb +493 -0
- data/lib/aspose_cells_cloud/api_error.rb +48 -0
- data/lib/aspose_cells_cloud/configuration.rb +178 -0
- data/lib/aspose_cells_cloud/models/above_average.rb +234 -0
- data/lib/aspose_cells_cloud/models/access_token_response.rb +261 -0
- data/lib/aspose_cells_cloud/models/area.rb +243 -0
- data/lib/aspose_cells_cloud/models/auto_filter.rb +227 -0
- data/lib/aspose_cells_cloud/models/auto_filter_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/auto_fitter_options.rb +231 -0
- data/lib/aspose_cells_cloud/models/auto_shape.rb +504 -0
- data/lib/aspose_cells_cloud/models/auto_shape_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/auto_shapes.rb +209 -0
- data/lib/aspose_cells_cloud/models/auto_shapes_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/border.rb +216 -0
- data/lib/aspose_cells_cloud/models/calculation_options.rb +225 -0
- data/lib/aspose_cells_cloud/models/cell.rb +401 -0
- data/lib/aspose_cells_cloud/models/cell_area.rb +245 -0
- data/lib/aspose_cells_cloud/models/cell_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/cell_value.rb +234 -0
- data/lib/aspose_cells_cloud/models/cells.rb +270 -0
- data/lib/aspose_cells_cloud/models/cells_cloud_file_info.rb +230 -0
- data/lib/aspose_cells_cloud/models/cells_cloud_response.rb +212 -0
- data/lib/aspose_cells_cloud/models/cells_color.rb +234 -0
- data/lib/aspose_cells_cloud/models/cells_document_properties.rb +209 -0
- data/lib/aspose_cells_cloud/models/cells_document_properties_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/cells_document_property.rb +225 -0
- data/lib/aspose_cells_cloud/models/cells_document_property_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/cells_error.rb +229 -0
- data/lib/aspose_cells_cloud/models/cells_object_operate_task_parameter.rb +216 -0
- data/lib/aspose_cells_cloud/models/cells_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/chart.rb +626 -0
- data/lib/aspose_cells_cloud/models/chart_area.rb +317 -0
- data/lib/aspose_cells_cloud/models/chart_area_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/chart_frame.rb +317 -0
- data/lib/aspose_cells_cloud/models/chart_operate_parameter.rb +279 -0
- data/lib/aspose_cells_cloud/models/charts.rb +209 -0
- data/lib/aspose_cells_cloud/models/charts_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/color.rb +245 -0
- data/lib/aspose_cells_cloud/models/color_filter.rb +234 -0
- data/lib/aspose_cells_cloud/models/color_filter_request.rb +216 -0
- data/lib/aspose_cells_cloud/models/color_scale.rb +249 -0
- data/lib/aspose_cells_cloud/models/column.rb +243 -0
- data/lib/aspose_cells_cloud/models/column_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/columns.rb +237 -0
- data/lib/aspose_cells_cloud/models/columns_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/comment.rb +297 -0
- data/lib/aspose_cells_cloud/models/comment_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/comments.rb +209 -0
- data/lib/aspose_cells_cloud/models/comments_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/conditional_formatting.rb +218 -0
- data/lib/aspose_cells_cloud/models/conditional_formatting_icon.rb +235 -0
- data/lib/aspose_cells_cloud/models/conditional_formatting_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/conditional_formatting_value.rb +219 -0
- data/lib/aspose_cells_cloud/models/conditional_formattings.rb +223 -0
- data/lib/aspose_cells_cloud/models/conditional_formattings_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/convert_task_parameter.rb +216 -0
- data/lib/aspose_cells_cloud/models/copy_options.rb +248 -0
- data/lib/aspose_cells_cloud/models/create_pivot_table_request.rb +263 -0
- data/lib/aspose_cells_cloud/models/custom_filter.rb +207 -0
- data/lib/aspose_cells_cloud/models/custom_parser_config.rb +216 -0
- data/lib/aspose_cells_cloud/models/data_bar.rb +309 -0
- data/lib/aspose_cells_cloud/models/data_bar_border.rb +209 -0
- data/lib/aspose_cells_cloud/models/data_sorter.rb +227 -0
- data/lib/aspose_cells_cloud/models/dif_save_options.rb +265 -0
- data/lib/aspose_cells_cloud/models/disc_usage.rb +219 -0
- data/lib/aspose_cells_cloud/models/dynamic_filter.rb +216 -0
- data/lib/aspose_cells_cloud/models/error_details.rb +214 -0
- data/lib/aspose_cells_cloud/models/file_source.rb +207 -0
- data/lib/aspose_cells_cloud/models/file_version.rb +274 -0
- data/lib/aspose_cells_cloud/models/file_versions.rb +201 -0
- data/lib/aspose_cells_cloud/models/files_list.rb +201 -0
- data/lib/aspose_cells_cloud/models/files_upload_result.rb +213 -0
- data/lib/aspose_cells_cloud/models/fill_format.rb +259 -0
- data/lib/aspose_cells_cloud/models/fill_format_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/filter_column.rb +277 -0
- data/lib/aspose_cells_cloud/models/font.rb +279 -0
- data/lib/aspose_cells_cloud/models/font_setting.rb +244 -0
- data/lib/aspose_cells_cloud/models/format_condition.rb +327 -0
- data/lib/aspose_cells_cloud/models/gradient_fill.rb +227 -0
- data/lib/aspose_cells_cloud/models/gradient_fill_stop.rb +226 -0
- data/lib/aspose_cells_cloud/models/horizontal_page_break.rb +231 -0
- data/lib/aspose_cells_cloud/models/horizontal_page_break_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/horizontal_page_breaks.rb +209 -0
- data/lib/aspose_cells_cloud/models/horizontal_page_breaks_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/html_save_options.rb +373 -0
- data/lib/aspose_cells_cloud/models/hyperlink.rb +234 -0
- data/lib/aspose_cells_cloud/models/hyperlink_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/hyperlinks.rb +223 -0
- data/lib/aspose_cells_cloud/models/hyperlinks_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/icon_filter.rb +212 -0
- data/lib/aspose_cells_cloud/models/icon_set.rb +253 -0
- data/lib/aspose_cells_cloud/models/image_save_options.rb +373 -0
- data/lib/aspose_cells_cloud/models/import_batch_data_option.rb +236 -0
- data/lib/aspose_cells_cloud/models/import_csv_data_option.rb +281 -0
- data/lib/aspose_cells_cloud/models/import_data_task_parameter.rb +216 -0
- data/lib/aspose_cells_cloud/models/import_double_array_option.rb +263 -0
- data/lib/aspose_cells_cloud/models/import_int_array_option.rb +263 -0
- data/lib/aspose_cells_cloud/models/import_option.rb +225 -0
- data/lib/aspose_cells_cloud/models/import_string_array_option.rb +263 -0
- data/lib/aspose_cells_cloud/models/legend.rb +335 -0
- data/lib/aspose_cells_cloud/models/legend_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/line.rb +360 -0
- data/lib/aspose_cells_cloud/models/line_format.rb +358 -0
- data/lib/aspose_cells_cloud/models/line_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/link.rb +225 -0
- data/lib/aspose_cells_cloud/models/link_element.rb +198 -0
- data/lib/aspose_cells_cloud/models/list_column.rb +209 -0
- data/lib/aspose_cells_cloud/models/list_object.rb +350 -0
- data/lib/aspose_cells_cloud/models/list_object_operate_parameter.rb +207 -0
- data/lib/aspose_cells_cloud/models/list_object_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/list_objects.rb +209 -0
- data/lib/aspose_cells_cloud/models/list_objects_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/m_html_save_options.rb +373 -0
- data/lib/aspose_cells_cloud/models/markdown_save_options.rb +292 -0
- data/lib/aspose_cells_cloud/models/merged_cell.rb +254 -0
- data/lib/aspose_cells_cloud/models/merged_cell_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/merged_cells.rb +223 -0
- data/lib/aspose_cells_cloud/models/merged_cells_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/multiple_filter.rb +189 -0
- data/lib/aspose_cells_cloud/models/multiple_filters.rb +209 -0
- data/lib/aspose_cells_cloud/models/name.rb +276 -0
- data/lib/aspose_cells_cloud/models/name_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/names.rb +223 -0
- data/lib/aspose_cells_cloud/models/names_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/negative_bar_format.rb +229 -0
- data/lib/aspose_cells_cloud/models/object_exist.rb +219 -0
- data/lib/aspose_cells_cloud/models/ods_save_options.rb +265 -0
- data/lib/aspose_cells_cloud/models/ole_object.rb +567 -0
- data/lib/aspose_cells_cloud/models/ole_object_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/ole_objects.rb +209 -0
- data/lib/aspose_cells_cloud/models/ole_objects_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/ooxml_save_options.rb +274 -0
- data/lib/aspose_cells_cloud/models/operate_object.rb +207 -0
- data/lib/aspose_cells_cloud/models/operate_object_position.rb +243 -0
- data/lib/aspose_cells_cloud/models/operate_parameter.rb +198 -0
- data/lib/aspose_cells_cloud/models/page_break_operate_parameter.rb +252 -0
- data/lib/aspose_cells_cloud/models/page_section.rb +259 -0
- data/lib/aspose_cells_cloud/models/page_sections_response.rb +223 -0
- data/lib/aspose_cells_cloud/models/page_setup.rb +542 -0
- data/lib/aspose_cells_cloud/models/page_setup_operate_parameter.rb +207 -0
- data/lib/aspose_cells_cloud/models/page_setup_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/password_request.rb +198 -0
- data/lib/aspose_cells_cloud/models/paste_options.rb +225 -0
- data/lib/aspose_cells_cloud/models/pattern_fill.rb +252 -0
- data/lib/aspose_cells_cloud/models/pdf_save_options.rb +355 -0
- data/lib/aspose_cells_cloud/models/pdf_security_options.rb +283 -0
- data/lib/aspose_cells_cloud/models/pic_format_option.rb +243 -0
- data/lib/aspose_cells_cloud/models/picture.rb +558 -0
- data/lib/aspose_cells_cloud/models/picture_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/pictures.rb +209 -0
- data/lib/aspose_cells_cloud/models/pictures_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/pivot_field.rb +546 -0
- data/lib/aspose_cells_cloud/models/pivot_field_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/pivot_filter.rb +279 -0
- data/lib/aspose_cells_cloud/models/pivot_filter_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/pivot_filters_response.rb +223 -0
- data/lib/aspose_cells_cloud/models/pivot_item.rb +228 -0
- data/lib/aspose_cells_cloud/models/pivot_table.rb +824 -0
- data/lib/aspose_cells_cloud/models/pivot_table_field_request.rb +200 -0
- data/lib/aspose_cells_cloud/models/pivot_table_operate_parameter.rb +276 -0
- data/lib/aspose_cells_cloud/models/pivot_table_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/pivot_tables.rb +209 -0
- data/lib/aspose_cells_cloud/models/pivot_tables_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/protect_sheet_parameter.rb +335 -0
- data/lib/aspose_cells_cloud/models/range.rb +309 -0
- data/lib/aspose_cells_cloud/models/range_copy_request.rb +225 -0
- data/lib/aspose_cells_cloud/models/range_set_outline_border_request.rb +225 -0
- data/lib/aspose_cells_cloud/models/range_set_style_request.rb +207 -0
- data/lib/aspose_cells_cloud/models/range_value_response.rb +223 -0
- data/lib/aspose_cells_cloud/models/ranges.rb +200 -0
- data/lib/aspose_cells_cloud/models/ranges_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/result_destination.rb +216 -0
- data/lib/aspose_cells_cloud/models/row.rb +261 -0
- data/lib/aspose_cells_cloud/models/row_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/rows.rb +237 -0
- data/lib/aspose_cells_cloud/models/rows_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/save_options.rb +265 -0
- data/lib/aspose_cells_cloud/models/save_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/save_result.rb +200 -0
- data/lib/aspose_cells_cloud/models/save_result_task_parameter.rb +207 -0
- data/lib/aspose_cells_cloud/models/shadow_effect.rb +252 -0
- data/lib/aspose_cells_cloud/models/shape.rb +504 -0
- data/lib/aspose_cells_cloud/models/shape_operate_parameter.rb +207 -0
- data/lib/aspose_cells_cloud/models/shape_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/shapes.rb +209 -0
- data/lib/aspose_cells_cloud/models/shapes_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/single_value.rb +207 -0
- data/lib/aspose_cells_cloud/models/single_value_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/smart_marker_task_parameter.rb +216 -0
- data/lib/aspose_cells_cloud/models/solid_fill.rb +216 -0
- data/lib/aspose_cells_cloud/models/sort_key.rb +221 -0
- data/lib/aspose_cells_cloud/models/sparkline.rb +226 -0
- data/lib/aspose_cells_cloud/models/sparkline_group.rb +434 -0
- data/lib/aspose_cells_cloud/models/sparkline_group_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/sparkline_groups.rb +200 -0
- data/lib/aspose_cells_cloud/models/sparkline_groups_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/split_result.rb +200 -0
- data/lib/aspose_cells_cloud/models/split_result_document.rb +212 -0
- data/lib/aspose_cells_cloud/models/split_result_response.rb +222 -0
- data/lib/aspose_cells_cloud/models/split_workbook_task_parameter.rb +243 -0
- data/lib/aspose_cells_cloud/models/spreadsheet_ml2003_save_options.rb +292 -0
- data/lib/aspose_cells_cloud/models/storage_exist.rb +204 -0
- data/lib/aspose_cells_cloud/models/storage_file.rb +249 -0
- data/lib/aspose_cells_cloud/models/style.rb +407 -0
- data/lib/aspose_cells_cloud/models/style_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/svg_save_options.rb +274 -0
- data/lib/aspose_cells_cloud/models/task_data.rb +200 -0
- data/lib/aspose_cells_cloud/models/task_description.rb +207 -0
- data/lib/aspose_cells_cloud/models/task_parameter.rb +189 -0
- data/lib/aspose_cells_cloud/models/text_item.rb +207 -0
- data/lib/aspose_cells_cloud/models/text_items.rb +209 -0
- data/lib/aspose_cells_cloud/models/text_items_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/text_options.rb +333 -0
- data/lib/aspose_cells_cloud/models/text_water_marker_request.rb +239 -0
- data/lib/aspose_cells_cloud/models/texture_fill.rb +243 -0
- data/lib/aspose_cells_cloud/models/theme_color.rb +207 -0
- data/lib/aspose_cells_cloud/models/tile_pic_option.rb +263 -0
- data/lib/aspose_cells_cloud/models/title.rb +380 -0
- data/lib/aspose_cells_cloud/models/title_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/top10.rb +219 -0
- data/lib/aspose_cells_cloud/models/top10_filter.rb +240 -0
- data/lib/aspose_cells_cloud/models/txt_save_options.rb +301 -0
- data/lib/aspose_cells_cloud/models/validation.rb +360 -0
- data/lib/aspose_cells_cloud/models/validation_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/validations.rb +223 -0
- data/lib/aspose_cells_cloud/models/validations_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/value_type.rb +189 -0
- data/lib/aspose_cells_cloud/models/vertical_page_break.rb +231 -0
- data/lib/aspose_cells_cloud/models/vertical_page_break_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/vertical_page_breaks.rb +209 -0
- data/lib/aspose_cells_cloud/models/vertical_page_breaks_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/workbook.rb +290 -0
- data/lib/aspose_cells_cloud/models/workbook_encryption_request.rb +224 -0
- data/lib/aspose_cells_cloud/models/workbook_operate_parameter.rb +198 -0
- data/lib/aspose_cells_cloud/models/workbook_protection_request.rb +209 -0
- data/lib/aspose_cells_cloud/models/workbook_replace_response.rb +235 -0
- data/lib/aspose_cells_cloud/models/workbook_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/workbook_settings.rb +626 -0
- data/lib/aspose_cells_cloud/models/workbook_settings_operate_parameter.rb +207 -0
- data/lib/aspose_cells_cloud/models/workbook_settings_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/worksheet.rb +510 -0
- data/lib/aspose_cells_cloud/models/worksheet_moving_request.rb +209 -0
- data/lib/aspose_cells_cloud/models/worksheet_replace_response.rb +235 -0
- data/lib/aspose_cells_cloud/models/worksheet_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/worksheets.rb +209 -0
- data/lib/aspose_cells_cloud/models/worksheets_response.rb +221 -0
- data/lib/aspose_cells_cloud/models/xls_save_options.rb +265 -0
- data/lib/aspose_cells_cloud/models/xlsb_save_options.rb +265 -0
- data/lib/aspose_cells_cloud/models/xps_save_options.rb +265 -0
- data/lib/aspose_cells_cloud/version.rb +25 -0
- data/spec/api/cells_api_spec.rb +1145 -0
- data/spec/api/cells_auto_filter_api_spec.rb +430 -0
- data/spec/api/cells_chart_area_api_spec.rb +92 -0
- data/spec/api/cells_charts_api_spec.rb +390 -0
- data/spec/api/cells_conditional_formattings_api_spec.rb +259 -0
- data/spec/api/cells_hypelinks_api_spec.rb +170 -0
- data/spec/api/cells_list_objects_api_spec.rb +245 -0
- data/spec/api/cells_ole_objects_api_spec.rb +177 -0
- data/spec/api/cells_page_breaks_api_spec.rb +269 -0
- data/spec/api/cells_page_setup_api_spec.rb +198 -0
- data/spec/api/cells_pictures_api_spec.rb +174 -0
- data/spec/api/cells_pivot_tables_api_spec.rb +525 -0
- data/spec/api/cells_properties_api_spec.rb +129 -0
- data/spec/api/cells_ranges_api_spec.rb +284 -0
- data/spec/api/cells_save_as_api_spec.rb +74 -0
- data/spec/api/cells_shapes_api_spec.rb +174 -0
- data/spec/api/cells_simple_spec.rb +44 -0
- data/spec/api/cells_sparkline_group_spec.rb +43 -0
- data/spec/api/cells_storage_api_spec.rb +69 -0
- data/spec/api/cells_storage_spec.rb +45 -0
- data/spec/api/cells_task_api_spec.rb +61 -0
- data/spec/api/cells_workbook_api_spec.rb +641 -0
- data/spec/api/cells_worksheet_validations_api_spec.rb +139 -0
- data/spec/api/cells_worksheets_api_spec.rb +843 -0
- data/spec/spec_helper.rb +132 -0
- metadata +282 -3
@@ -0,0 +1,129 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
# Unit tests for AsposeCellsCloud::CellsPropertiesApi
|
7
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
8
|
+
# Please update as you see appropriate
|
9
|
+
describe 'CellsPropertiesApi' do
|
10
|
+
before do
|
11
|
+
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
12
|
+
$VERBOSE = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
after do
|
16
|
+
# run after each test
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
# unit tests for cells_properties_delete_document_properties
|
22
|
+
# Delete all custom document properties and clean built-in ones.
|
23
|
+
#
|
24
|
+
# @param name The document name.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :folder The document folder.
|
27
|
+
# @option opts [String] :storage storage name.
|
28
|
+
# @return [CellsDocumentPropertiesResponse]
|
29
|
+
describe 'cells_properties_delete_document_properties test' do
|
30
|
+
it "should work" do
|
31
|
+
name = $BOOK1
|
32
|
+
folder = $TEMPFOLDER
|
33
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
34
|
+
expect(result.uploaded.size).to be > 0
|
35
|
+
result = @instance.cells_properties_delete_document_properties(name, { :folder=>folder})
|
36
|
+
expect(result.code).to eql(200)
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# unit tests for cells_properties_delete_document_property
|
42
|
+
# Delete document property.
|
43
|
+
#
|
44
|
+
# @param name The document name.
|
45
|
+
# @param property_name The property name.
|
46
|
+
# @param [Hash] opts the optional parameters
|
47
|
+
# @option opts [String] :folder The document folder.
|
48
|
+
# @option opts [String] :storage storage name.
|
49
|
+
# @return [CellsDocumentPropertiesResponse]
|
50
|
+
describe 'cells_properties_delete_document_property test' do
|
51
|
+
it "should work" do
|
52
|
+
name = $BOOK1
|
53
|
+
property_name = 'Author'
|
54
|
+
folder = $TEMPFOLDER
|
55
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
56
|
+
expect(result.uploaded.size).to be > 0
|
57
|
+
result = @instance.cells_properties_delete_document_property(name, property_name, { :folder=>folder})
|
58
|
+
expect(result.code).to eql(200)
|
59
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# unit tests for cells_properties_get_document_properties
|
64
|
+
# Read document properties.
|
65
|
+
#
|
66
|
+
# @param name The document name.
|
67
|
+
# @param [Hash] opts the optional parameters
|
68
|
+
# @option opts [String] :folder The document folder.
|
69
|
+
# @option opts [String] :storage storage name.
|
70
|
+
# @return [CellsDocumentPropertiesResponse]
|
71
|
+
describe 'cells_properties_get_document_properties test' do
|
72
|
+
it "should work" do
|
73
|
+
name = $BOOK1
|
74
|
+
folder = $TEMPFOLDER
|
75
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
76
|
+
expect(result.uploaded.size).to be > 0
|
77
|
+
result = @instance.cells_properties_get_document_properties(name, { :folder=>folder})
|
78
|
+
expect(result.code).to eql(200)
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# unit tests for cells_properties_get_document_property
|
84
|
+
# Read document property by name.
|
85
|
+
#
|
86
|
+
# @param name The document name.
|
87
|
+
# @param property_name The property name.
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @option opts [String] :folder The document folder.
|
90
|
+
# @option opts [String] :storage storage name.
|
91
|
+
# @return [CellsDocumentPropertyResponse]
|
92
|
+
describe 'cells_properties_get_document_property test' do
|
93
|
+
it "should work" do
|
94
|
+
name = $BOOK1
|
95
|
+
property_name = 'Author'
|
96
|
+
folder = $TEMPFOLDER
|
97
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
98
|
+
expect(result.uploaded.size).to be > 0
|
99
|
+
result = @instance.cells_properties_get_document_property(name, property_name, { :folder=>folder})
|
100
|
+
expect(result.code).to eql(200)
|
101
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
# unit tests for cells_properties_put_document_property
|
106
|
+
# Set/create document property.
|
107
|
+
#
|
108
|
+
# @param name The document name.
|
109
|
+
# @param property_name The property name.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [CellsDocumentProperty] :property with new property value.
|
112
|
+
# @option opts [String] :folder The document folder.
|
113
|
+
# @option opts [String] :storage storage name.
|
114
|
+
# @return [CellsDocumentPropertyResponse]
|
115
|
+
describe 'cells_properties_put_document_property test' do
|
116
|
+
it "should work" do
|
117
|
+
name = $BOOK1
|
118
|
+
property_name = 'Author'
|
119
|
+
property = AsposeCellsCloud::CellsDocumentProperty.new({:Name=>'Author',:Value=>'roy'})
|
120
|
+
folder = $TEMPFOLDER
|
121
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
122
|
+
expect(result.uploaded.size).to be > 0
|
123
|
+
result = @instance.cells_properties_put_document_property(name, property_name, { :property=>property, :folder=>folder})
|
124
|
+
expect(result.code).to eql(201)
|
125
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
end
|
@@ -0,0 +1,284 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
# Unit tests for AsposeCellsCloud::CellsRangesApi
|
7
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
8
|
+
# Please update as you see appropriate
|
9
|
+
describe 'CellsRangesApi' do
|
10
|
+
before do
|
11
|
+
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
12
|
+
$VERBOSE = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
after do
|
16
|
+
# run after each test
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
# unit tests for cells_ranges_get_worksheet_cells_range_value
|
21
|
+
# Get cells list in a range by range name or row column indexes
|
22
|
+
#
|
23
|
+
# @param name workbook name
|
24
|
+
# @param sheet_name worksheet name
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :namerange range name, for example: 'A1:B2' or 'range_name1'
|
27
|
+
# @option opts [Integer] :first_row the first row of the range
|
28
|
+
# @option opts [Integer] :first_column the first column of the range
|
29
|
+
# @option opts [Integer] :row_count the count of rows in the range
|
30
|
+
# @option opts [Integer] :column_count the count of columns in the range
|
31
|
+
# @option opts [String] :folder Workbook folder.
|
32
|
+
# @option opts [String] :storage storage name.
|
33
|
+
# @return [RangeValueResponse]
|
34
|
+
describe 'cells_ranges_get_worksheet_cells_range_value test' do
|
35
|
+
it "should work" do
|
36
|
+
name = $BOOK1
|
37
|
+
sheet_name = $SHEET1
|
38
|
+
namerange = 'A1:B3'
|
39
|
+
first_row = 1
|
40
|
+
first_column = 1
|
41
|
+
row_count = 3
|
42
|
+
column_count = 2
|
43
|
+
folder = $TEMPFOLDER
|
44
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
45
|
+
expect(result.uploaded.size).to be > 0
|
46
|
+
result = @instance.cells_ranges_get_worksheet_cells_range_value(name, sheet_name, { :namerange=>namerange, :first_row=>first_row, :first_column=>first_column, :row_count=>row_count, :column_count=>column_count,:folder=>folder})
|
47
|
+
expect(result.code).to eql(200)
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_column_width
|
53
|
+
# Set column width of range
|
54
|
+
#
|
55
|
+
# @param name
|
56
|
+
# @param sheet_name
|
57
|
+
# @param value
|
58
|
+
# @param [Hash] opts the optional parameters
|
59
|
+
# @option opts [Range] :range
|
60
|
+
# @option opts [String] :folder
|
61
|
+
# @option opts [String] :storage storage name.
|
62
|
+
# @return [CellsCloudResponse]
|
63
|
+
describe 'cells_ranges_post_worksheet_cells_range_column_width test' do
|
64
|
+
it "should work" do
|
65
|
+
name = $BOOK1
|
66
|
+
sheet_name = $SHEET1
|
67
|
+
value = 10.01
|
68
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
69
|
+
folder = $TEMPFOLDER
|
70
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
71
|
+
expect(result.uploaded.size).to be > 0
|
72
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_column_width(name, sheet_name, value, {:range=>range,:folder=>folder})
|
73
|
+
expect(result.code).to eql(200)
|
74
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_merge
|
79
|
+
# Combines a range of cells into a single cell.
|
80
|
+
#
|
81
|
+
# @param name workbook name
|
82
|
+
# @param sheet_name worksheet name
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @option opts [Range] :range range in worksheet
|
85
|
+
# @option opts [String] :folder Workbook folder.
|
86
|
+
# @option opts [String] :storage storage name.
|
87
|
+
# @return [CellsCloudResponse]
|
88
|
+
describe 'cells_ranges_post_worksheet_cells_range_merge test' do
|
89
|
+
it "should work" do
|
90
|
+
name = $BOOK1
|
91
|
+
sheet_name = $SHEET1
|
92
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
93
|
+
folder = $TEMPFOLDER
|
94
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
95
|
+
expect(result.uploaded.size).to be > 0
|
96
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_merge(name, sheet_name, { :range=>range, :folder=>folder})
|
97
|
+
expect(result.code).to eql(200)
|
98
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_move_to
|
103
|
+
# Move the current range to the dest range.
|
104
|
+
#
|
105
|
+
# @param name workbook name
|
106
|
+
# @param sheet_name worksheet name
|
107
|
+
# @param dest_row The start row of the dest range.
|
108
|
+
# @param dest_column The start column of the dest range.
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @option opts [Range] :range range in worksheet
|
111
|
+
# @option opts [String] :folder Workbook folder.
|
112
|
+
# @option opts [String] :storage storage name.
|
113
|
+
# @return [CellsCloudResponse]
|
114
|
+
describe 'cells_ranges_post_worksheet_cells_range_move_to test' do
|
115
|
+
it "should work" do
|
116
|
+
name = $BOOK1
|
117
|
+
sheet_name = $SHEET1
|
118
|
+
dest_row = 1
|
119
|
+
dest_column = 1
|
120
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
121
|
+
folder = $TEMPFOLDER
|
122
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
123
|
+
expect(result.uploaded.size).to be > 0
|
124
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_move_to(name, sheet_name, dest_row, dest_column, { :range=>range, :folder=>folder})
|
125
|
+
expect(result.code).to eql(200)
|
126
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_outline_border
|
131
|
+
# Sets outline border around a range of cells.
|
132
|
+
#
|
133
|
+
# @param name workbook name
|
134
|
+
# @param sheet_name worksheet name
|
135
|
+
# @param [Hash] opts the optional parameters
|
136
|
+
# @option opts [RangeSetOutlineBorderRequest] :range_operate Range Set OutlineBorder Request
|
137
|
+
# @option opts [String] :folder Workbook folder.
|
138
|
+
# @option opts [String] :storage storage name.
|
139
|
+
# @return [CellsCloudResponse]
|
140
|
+
describe 'cells_ranges_post_worksheet_cells_range_outline_border test' do
|
141
|
+
it "should work" do
|
142
|
+
name = $BOOK1
|
143
|
+
sheet_name = $SHEET1
|
144
|
+
color = AsposeCellsCloud::Color.new({:A=>255})
|
145
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
146
|
+
range_operate = AsposeCellsCloud::RangeSetOutlineBorderRequest.new({:borderEdge=>'LeftBorder',:borderStyle=>'Dotted',:borderColor=>color,:Range=>range })
|
147
|
+
folder = $TEMPFOLDER
|
148
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
149
|
+
expect(result.uploaded.size).to be > 0
|
150
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_outline_border(name, sheet_name, { :range_operate=>range_operate, :folder=>folder})
|
151
|
+
expect(result.code).to eql(200)
|
152
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_row_height
|
157
|
+
# set row height of range
|
158
|
+
#
|
159
|
+
# @param name
|
160
|
+
# @param sheet_name
|
161
|
+
# @param value
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @option opts [Range] :range
|
164
|
+
# @option opts [String] :folder
|
165
|
+
# @option opts [String] :storage storage name.
|
166
|
+
# @return [CellsCloudResponse]
|
167
|
+
describe 'cells_ranges_post_worksheet_cells_range_row_height test' do
|
168
|
+
it "should work" do
|
169
|
+
name = $BOOK1
|
170
|
+
sheet_name = $SHEET1
|
171
|
+
value = 10.01
|
172
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
173
|
+
folder = $TEMPFOLDER
|
174
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
175
|
+
expect(result.uploaded.size).to be > 0
|
176
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_row_height(name, sheet_name, value, { :range=>range, :folder=>folder})
|
177
|
+
expect(result.code).to eql(200)
|
178
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_style
|
183
|
+
# Sets the style of the range.
|
184
|
+
#
|
185
|
+
# @param name workbook name
|
186
|
+
# @param sheet_name worksheet name
|
187
|
+
# @param [Hash] opts the optional parameters
|
188
|
+
# @option opts [RangeSetStyleRequest] :range_operate Range Set Style Request
|
189
|
+
# @option opts [String] :folder Workbook folder.
|
190
|
+
# @option opts [String] :storage storage name.
|
191
|
+
# @return [CellsCloudResponse]
|
192
|
+
describe 'cells_ranges_post_worksheet_cells_range_style test' do
|
193
|
+
it "should work" do
|
194
|
+
name = $BOOK1
|
195
|
+
sheet_name = $SHEET1
|
196
|
+
range_operate = AsposeCellsCloud::RangeSetStyleRequest.new({:Range=>AsposeCellsCloud::Range.new({:ColumnCount=>1,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10} ), :Style=>AsposeCellsCloud::Style.new()})
|
197
|
+
folder = $TEMPFOLDER
|
198
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
199
|
+
expect(result.uploaded.size).to be > 0
|
200
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_style(name, sheet_name, {:range_operate=>range_operate, :folder=>folder})
|
201
|
+
expect(result.code).to eql(200)
|
202
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_unmerge
|
207
|
+
# Unmerges merged cells of this range.
|
208
|
+
#
|
209
|
+
# @param name workbook name
|
210
|
+
# @param sheet_name worksheet name
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @option opts [Range] :range range in worksheet
|
213
|
+
# @option opts [String] :folder Workbook folder.
|
214
|
+
# @option opts [String] :storage storage name.
|
215
|
+
# @return [CellsCloudResponse]
|
216
|
+
describe 'cells_ranges_post_worksheet_cells_range_unmerge test' do
|
217
|
+
it "should work" do
|
218
|
+
name = $BOOK1
|
219
|
+
sheet_name = $SHEET1
|
220
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
221
|
+
folder = $TEMPFOLDER
|
222
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
223
|
+
expect(result.uploaded.size).to be > 0
|
224
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_unmerge(name, sheet_name, {:range=>range, :folder=>folder})
|
225
|
+
expect(result.code).to eql(200)
|
226
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# unit tests for cells_ranges_post_worksheet_cells_range_value
|
231
|
+
# Puts a value into the range, if appropriate the value will be converted to other data type and cell's number format will be reset.
|
232
|
+
#
|
233
|
+
# @param name workbook name
|
234
|
+
# @param sheet_name worksheet name
|
235
|
+
# @param value Input value
|
236
|
+
# @param [Hash] opts the optional parameters
|
237
|
+
# @option opts [Range] :range range in worksheet
|
238
|
+
# @option opts [BOOLEAN] :is_converted True: converted to other data type if appropriate.
|
239
|
+
# @option opts [BOOLEAN] :set_style True: set the number format to cell's style when converting to other data type
|
240
|
+
# @option opts [String] :folder Workbook folder.
|
241
|
+
# @option opts [String] :storage storage name.
|
242
|
+
# @return [CellsCloudResponse]
|
243
|
+
describe 'cells_ranges_post_worksheet_cells_range_value test' do
|
244
|
+
it "should work" do
|
245
|
+
name = $BOOK1
|
246
|
+
sheet_name = $SHEET1
|
247
|
+
value = 10
|
248
|
+
range = AsposeCellsCloud::Range.new({:ColumnCount=>1,:ColumnWidth=>10.01,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10})
|
249
|
+
is_converted = true
|
250
|
+
set_style = true
|
251
|
+
folder = $TEMPFOLDER
|
252
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
253
|
+
expect(result.uploaded.size).to be > 0
|
254
|
+
result = @instance.cells_ranges_post_worksheet_cells_range_value(name, sheet_name, value, {:range=>range, :is_converted=>is_converted, :set_style=>set_style, :folder=>folder})
|
255
|
+
expect(result.code).to eql(200)
|
256
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
# unit tests for cells_ranges_post_worksheet_cells_ranges
|
261
|
+
# copy range in the worksheet
|
262
|
+
#
|
263
|
+
# @param name workbook name
|
264
|
+
# @param sheet_name worksheet name
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @option opts [RangeCopyRequest] :range_operate copydata,copystyle,copyto,copyvalue
|
267
|
+
# @option opts [String] :folder Workbook folder.
|
268
|
+
# @option opts [String] :storage storage name.
|
269
|
+
# @return [CellsCloudResponse]
|
270
|
+
describe 'cells_ranges_post_worksheet_cells_ranges test' do
|
271
|
+
it "should work" do
|
272
|
+
name = $BOOK1
|
273
|
+
sheet_name = $SHEET1
|
274
|
+
range_operate = AsposeCellsCloud::RangeCopyRequest.new({:Operate=>'copydata',:PasteOptions=>AsposeCellsCloud::PasteOptions.new({:OnlyVisibleCells=>true}),:Source=>AsposeCellsCloud::Range.new({:ColumnCount=>1,:FirstColumn=>1,:FirstRow=>1,:RowCount=>10}),:Target=>AsposeCellsCloud::Range.new({:ColumnCount=>1,:FirstColumn=>11,:FirstRow=>11,:RowCount=>10})})
|
275
|
+
folder = $TEMPFOLDER
|
276
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
277
|
+
expect(result.uploaded.size).to be > 0
|
278
|
+
result = @instance.cells_ranges_post_worksheet_cells_ranges(name, sheet_name, { :range_operate=>range_operate , :folder=>folder})
|
279
|
+
expect(result.code).to eql(200)
|
280
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
# Unit tests for AsposeCellsCloud::CellsSaveAsApi
|
6
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
7
|
+
# Please update as you see appropriate
|
8
|
+
describe 'CellsSaveAsApi' do
|
9
|
+
before do
|
10
|
+
@instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,$api_version,$baseurl)
|
11
|
+
$VERBOSE = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
after do
|
15
|
+
# run after each test
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
# unit tests for cells_save_as_post_document_save_as
|
20
|
+
# Convert document and save result to storage.
|
21
|
+
#
|
22
|
+
# @param name The document name.
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [SaveOptions] :save_options Save options.
|
25
|
+
# @option opts [String] :newfilename The new file name.
|
26
|
+
# @option opts [BOOLEAN] :is_auto_fit_rows Autofit rows.
|
27
|
+
# @option opts [BOOLEAN] :is_auto_fit_columns Autofit columns.
|
28
|
+
# @option opts [String] :folder The document folder.
|
29
|
+
# @option opts [String] :storage storage name.
|
30
|
+
# @return [SaveResponse]
|
31
|
+
describe 'cells_save_as_post_document_save_as test' do
|
32
|
+
it "should work" do
|
33
|
+
name = $BOOK1
|
34
|
+
save_options = nil
|
35
|
+
newfilename = 'newbook.xlsx'
|
36
|
+
is_auto_fit_rows = true
|
37
|
+
is_auto_fit_columns = true
|
38
|
+
folder = $TEMPFOLDER
|
39
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
40
|
+
expect(result.uploaded.size).to be > 0
|
41
|
+
result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder+"/"+newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder})
|
42
|
+
expect(result.code).to eql(200)
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# unit tests for cells_save_as_post_document_save_as
|
48
|
+
# Convert document and save result to storage.
|
49
|
+
#
|
50
|
+
# @param name The document name.
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @option opts [SaveOptions] :save_options Save options.
|
53
|
+
# @option opts [String] :newfilename The new file name.
|
54
|
+
# @option opts [BOOLEAN] :is_auto_fit_rows Autofit rows.
|
55
|
+
# @option opts [BOOLEAN] :is_auto_fit_columns Autofit columns.
|
56
|
+
# @option opts [String] :folder The document folder.
|
57
|
+
# @option opts [String] :storage storage name.
|
58
|
+
# @return [SaveResponse]
|
59
|
+
describe 'cells_save_as_post_document_save_as md format test' do
|
60
|
+
it "should work" do
|
61
|
+
name = $BOOK1
|
62
|
+
save_options = nil
|
63
|
+
newfilename = 'newbook.xls.md'
|
64
|
+
is_auto_fit_rows = true
|
65
|
+
is_auto_fit_columns = true
|
66
|
+
folder = $TEMPFOLDER
|
67
|
+
result = @instance.upload_file( folder+"/"+name, ::File.open(File.expand_path("data/"+name),"r") {|io| io.read(io.size) })
|
68
|
+
expect(result.uploaded.size).to be > 0
|
69
|
+
result = @instance.cells_save_as_post_document_save_as(name, { :save_options=>save_options, :newfilename=>(folder+"/"+newfilename), :is_auto_fit_rows=>is_auto_fit_rows, :is_auto_fit_columns=>is_auto_fit_columns, :folder=>folder})
|
70
|
+
expect(result.code).to eql(200)
|
71
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|