=begin Copyright (c) 2019 Aspose Pty Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. =end require 'spec_helper' #require 'json' # Unit tests for AsposeSlidesCloud::SlidesAsyncApi # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate describe 'SlidesAsyncApi' do # unit tests for get_operation_result # @param id # @param [Hash] opts the optional parameters # @return [File] describe 'get_operation_result test' do it 'should work' do paramid = AsposeSlidesCloud::SpecUtils.get_param_value('id', 'GetOperationResult', 'String') AsposeSlidesCloud::SpecUtils.initialize('GetOperationResult', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.get_operation_result_with_http_info(paramid) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationResult', nil, nil, nil) expect(c).to eq(code) expect(o).not_to be_nil end it 'invalid id' do paramid = AsposeSlidesCloud::SpecUtils.get_param_value('id', 'GetOperationResult', 'String') paramid = AsposeSlidesCloud::SpecUtils.invalidize_param_value('id', 'GetOperationResult', paramid, 'String') AsposeSlidesCloud::SpecUtils.initialize('GetOperationResult', 'id', paramid) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.get_operation_result_with_http_info(paramid) unless AsposeSlidesCloud::SpecUtils.no_exception?('GetOperationResult', 'id') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationResult', 'id', paramid, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationResult', 'id', paramid, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for get_operation_status # @param id # @param [Hash] opts the optional parameters # @return [Operation] describe 'get_operation_status test' do it 'should work' do paramid = AsposeSlidesCloud::SpecUtils.get_param_value('id', 'GetOperationStatus', 'String') AsposeSlidesCloud::SpecUtils.initialize('GetOperationStatus', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.get_operation_status_with_http_info(paramid) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationStatus', nil, nil, nil) expect(c).to eq(code) expect(o).not_to be_nil end it 'invalid id' do paramid = AsposeSlidesCloud::SpecUtils.get_param_value('id', 'GetOperationStatus', 'String') paramid = AsposeSlidesCloud::SpecUtils.invalidize_param_value('id', 'GetOperationStatus', paramid, 'String') AsposeSlidesCloud::SpecUtils.initialize('GetOperationStatus', 'id', paramid) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.get_operation_status_with_http_info(paramid) unless AsposeSlidesCloud::SpecUtils.no_exception?('GetOperationStatus', 'id') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationStatus', 'id', paramid, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('GetOperationStatus', 'id', paramid, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_convert # @param document Document data. # @param format # @param [Hash] opts the optional parameters # @option opts [String] :password # @option opts [String] :storage # @option opts [String] :fonts_folder # @option opts [Integer[]] :slides # @option opts [ExportOptions] :options # @return [String] describe 'start_convert test' do it 'should work' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', nil, nil, nil) expect(c).to eq(code) end it 'invalid document' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramdocument = AsposeSlidesCloud::SpecUtils.invalidize_param_value('document', 'StartConvert', paramdocument, 'File') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'document', paramdocument) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'document') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'document', paramdocument, 'File') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'document', paramdocument, 'File') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid format' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramformat = AsposeSlidesCloud::SpecUtils.invalidize_param_value('format', 'StartConvert', paramformat, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'format', paramformat) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'format') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'format', paramformat, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'format', paramformat, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid password' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'StartConvert', parampassword, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'password', parampassword) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'password') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'password', parampassword, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'password', parampassword, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartConvert', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid fonts_folder' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramfonts_folder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('fontsFolder', 'StartConvert', paramfonts_folder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'fontsFolder', paramfonts_folder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'fontsFolder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'fontsFolder', paramfonts_folder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'fontsFolder', paramfonts_folder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid slides' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramslides = AsposeSlidesCloud::SpecUtils.invalidize_param_value('slides', 'StartConvert', paramslides, 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'slides', paramslides) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'slides') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'slides', paramslides, 'Integer[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'slides', paramslides, 'Integer[]') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid options' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvert', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvert', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvert', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvert', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvert', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvert', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvert', 'ExportOptions') paramoptions = AsposeSlidesCloud::SpecUtils.invalidize_param_value('options', 'StartConvert', paramoptions, 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartConvert', 'options', paramoptions) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_with_http_info(paramdocument, paramformat, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvert', 'options') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'options', paramoptions, 'ExportOptions') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvert', 'options', paramoptions, 'ExportOptions') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_convert_and_save # @param document Document data. # @param format # @param out_path # @param [Hash] opts the optional parameters # @option opts [String] :password # @option opts [String] :storage # @option opts [String] :fonts_folder # @option opts [Integer[]] :slides # @option opts [ExportOptions] :options # @return [String] describe 'start_convert_and_save test' do it 'should work' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', nil, nil, nil) expect(c).to eq(code) end it 'invalid document' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramdocument = AsposeSlidesCloud::SpecUtils.invalidize_param_value('document', 'StartConvertAndSave', paramdocument, 'File') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'document', paramdocument) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'document') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'document', paramdocument, 'File') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'document', paramdocument, 'File') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid format' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramformat = AsposeSlidesCloud::SpecUtils.invalidize_param_value('format', 'StartConvertAndSave', paramformat, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'format', paramformat) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'format') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'format', paramformat, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'format', paramformat, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid out_path' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramout_path = AsposeSlidesCloud::SpecUtils.invalidize_param_value('outPath', 'StartConvertAndSave', paramout_path, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'outPath', paramout_path) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'outPath') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'outPath', paramout_path, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'outPath', paramout_path, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid password' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'StartConvertAndSave', parampassword, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'password', parampassword) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'password') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'password', parampassword, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'password', parampassword, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartConvertAndSave', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid fonts_folder' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramfonts_folder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('fontsFolder', 'StartConvertAndSave', paramfonts_folder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'fontsFolder', paramfonts_folder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'fontsFolder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'fontsFolder', paramfonts_folder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'fontsFolder', paramfonts_folder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid slides' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramslides = AsposeSlidesCloud::SpecUtils.invalidize_param_value('slides', 'StartConvertAndSave', paramslides, 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'slides', paramslides) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'slides') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'slides', paramslides, 'Integer[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'slides', paramslides, 'Integer[]') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid options' do paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'StartConvertAndSave', 'File') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartConvertAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartConvertAndSave', 'String') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartConvertAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartConvertAndSave', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartConvertAndSave', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartConvertAndSave', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartConvertAndSave', 'ExportOptions') paramoptions = AsposeSlidesCloud::SpecUtils.invalidize_param_value('options', 'StartConvertAndSave', paramoptions, 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartConvertAndSave', 'options', paramoptions) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_convert_and_save_with_http_info(paramdocument, paramformat, paramout_path, parampassword, paramstorage, paramfonts_folder, paramslides, paramoptions) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartConvertAndSave', 'options') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'options', paramoptions, 'ExportOptions') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartConvertAndSave', 'options', paramoptions, 'ExportOptions') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_download_presentation # @param name # @param format # @param [Hash] opts the optional parameters # @option opts [ExportOptions] :options # @option opts [String] :password # @option opts [String] :folder # @option opts [String] :storage # @option opts [String] :fonts_folder # @option opts [Integer[]] :slides # @return [String] describe 'start_download_presentation test' do it 'should work' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', nil, nil, nil) expect(c).to eq(code) expect(o).not_to be_nil end it 'invalid name' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramname = AsposeSlidesCloud::SpecUtils.invalidize_param_value('name', 'StartDownloadPresentation', paramname, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'name', paramname) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'name') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'name', paramname, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'name', paramname, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid format' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramformat = AsposeSlidesCloud::SpecUtils.invalidize_param_value('format', 'StartDownloadPresentation', paramformat, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'format', paramformat) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'format') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'format', paramformat, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'format', paramformat, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid options' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.invalidize_param_value('options', 'StartDownloadPresentation', paramoptions, 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'options', paramoptions) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'options') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'options', paramoptions, 'ExportOptions') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'options', paramoptions, 'ExportOptions') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid password' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'StartDownloadPresentation', parampassword, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'password', parampassword) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'password') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'password', parampassword, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'password', parampassword, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid folder' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramfolder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('folder', 'StartDownloadPresentation', paramfolder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'folder', paramfolder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'folder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'folder', paramfolder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'folder', paramfolder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartDownloadPresentation', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid fonts_folder' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramfonts_folder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('fontsFolder', 'StartDownloadPresentation', paramfonts_folder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'fontsFolder', paramfonts_folder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'fontsFolder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'fontsFolder', paramfonts_folder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'fontsFolder', paramfonts_folder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid slides' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartDownloadPresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartDownloadPresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartDownloadPresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartDownloadPresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartDownloadPresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartDownloadPresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartDownloadPresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartDownloadPresentation', 'Integer[]') paramslides = AsposeSlidesCloud::SpecUtils.invalidize_param_value('slides', 'StartDownloadPresentation', paramslides, 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartDownloadPresentation', 'slides', paramslides) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_download_presentation_with_http_info(paramname, paramformat, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartDownloadPresentation', 'slides') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'slides', paramslides, 'Integer[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartDownloadPresentation', 'slides', paramslides, 'Integer[]') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_merge # @param [Hash] opts the optional parameters # @option opts [File[]] :files Files to merge # @option opts [OrderedMergeRequest] :request # @option opts [String] :storage # @return [String] describe 'start_merge test' do it 'should work' do paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMerge', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMerge', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMerge', 'String') AsposeSlidesCloud::SpecUtils.initialize('StartMerge', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_with_http_info(paramfiles, paramrequest, paramstorage) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', nil, nil, nil) expect(c).to eq(code) end it 'invalid files' do paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMerge', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMerge', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMerge', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.invalidize_param_value('files', 'StartMerge', paramfiles, 'File[]') AsposeSlidesCloud::SpecUtils.initialize('StartMerge', 'files', paramfiles) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_with_http_info(paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMerge', 'files') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'files', paramfiles, 'File[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'files', paramfiles, 'File[]') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid request' do paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMerge', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMerge', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMerge', 'String') paramrequest = AsposeSlidesCloud::SpecUtils.invalidize_param_value('request', 'StartMerge', paramrequest, 'OrderedMergeRequest') AsposeSlidesCloud::SpecUtils.initialize('StartMerge', 'request', paramrequest) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_with_http_info(paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMerge', 'request') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'request', paramrequest, 'OrderedMergeRequest') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'request', paramrequest, 'OrderedMergeRequest') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMerge', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMerge', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMerge', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartMerge', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartMerge', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_with_http_info(paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMerge', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMerge', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_merge_and_save # @param out_path # @param [Hash] opts the optional parameters # @option opts [File[]] :files Files to merge # @option opts [OrderedMergeRequest] :request # @option opts [String] :storage # @return [String] describe 'start_merge_and_save test' do it 'should work' do paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMergeAndSave', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMergeAndSave', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMergeAndSave', 'String') AsposeSlidesCloud::SpecUtils.initialize('StartMergeAndSave', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_and_save_with_http_info(paramout_path, paramfiles, paramrequest, paramstorage) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', nil, nil, nil) expect(c).to eq(code) end it 'invalid out_path' do paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMergeAndSave', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMergeAndSave', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMergeAndSave', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.invalidize_param_value('outPath', 'StartMergeAndSave', paramout_path, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartMergeAndSave', 'outPath', paramout_path) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_and_save_with_http_info(paramout_path, paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMergeAndSave', 'outPath') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'outPath', paramout_path, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'outPath', paramout_path, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid files' do paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMergeAndSave', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMergeAndSave', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.invalidize_param_value('files', 'StartMergeAndSave', paramfiles, 'File[]') AsposeSlidesCloud::SpecUtils.initialize('StartMergeAndSave', 'files', paramfiles) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_and_save_with_http_info(paramout_path, paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMergeAndSave', 'files') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'files', paramfiles, 'File[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'files', paramfiles, 'File[]') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid request' do paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMergeAndSave', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMergeAndSave', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMergeAndSave', 'String') paramrequest = AsposeSlidesCloud::SpecUtils.invalidize_param_value('request', 'StartMergeAndSave', paramrequest, 'OrderedMergeRequest') AsposeSlidesCloud::SpecUtils.initialize('StartMergeAndSave', 'request', paramrequest) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_and_save_with_http_info(paramout_path, paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMergeAndSave', 'request') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'request', paramrequest, 'OrderedMergeRequest') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'request', paramrequest, 'OrderedMergeRequest') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartMergeAndSave', 'String') paramfiles = AsposeSlidesCloud::SpecUtils.get_param_value('files', 'StartMergeAndSave', 'File[]') paramrequest = AsposeSlidesCloud::SpecUtils.get_param_value('request', 'StartMergeAndSave', 'OrderedMergeRequest') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartMergeAndSave', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartMergeAndSave', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartMergeAndSave', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_merge_and_save_with_http_info(paramout_path, paramfiles, paramrequest, paramstorage) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartMergeAndSave', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartMergeAndSave', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end end # unit tests for start_save_presentation # @param name # @param format # @param out_path # @param [Hash] opts the optional parameters # @option opts [ExportOptions] :options # @option opts [String] :password # @option opts [String] :folder # @option opts [String] :storage # @option opts [String] :fonts_folder # @option opts [Integer[]] :slides # @return [String] describe 'start_save_presentation test' do it 'should work' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', nil, nil) o, c, _h = AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', nil, nil, nil) expect(c).to eq(code) expect(o).not_to be_nil end it 'invalid name' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramname = AsposeSlidesCloud::SpecUtils.invalidize_param_value('name', 'StartSavePresentation', paramname, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'name', paramname) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'name') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'name', paramname, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'name', paramname, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid format' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramformat = AsposeSlidesCloud::SpecUtils.invalidize_param_value('format', 'StartSavePresentation', paramformat, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'format', paramformat) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'format') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'format', paramformat, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'format', paramformat, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid out_path' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramout_path = AsposeSlidesCloud::SpecUtils.invalidize_param_value('outPath', 'StartSavePresentation', paramout_path, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'outPath', paramout_path) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'outPath') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'outPath', paramout_path, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'outPath', paramout_path, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid options' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramoptions = AsposeSlidesCloud::SpecUtils.invalidize_param_value('options', 'StartSavePresentation', paramoptions, 'ExportOptions') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'options', paramoptions) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'options') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'options', paramoptions, 'ExportOptions') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'options', paramoptions, 'ExportOptions') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid password' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'StartSavePresentation', parampassword, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'password', parampassword) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'password') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'password', parampassword, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'password', parampassword, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid folder' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramfolder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('folder', 'StartSavePresentation', paramfolder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'folder', paramfolder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'folder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'folder', paramfolder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'folder', paramfolder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid storage' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'StartSavePresentation', paramstorage, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'storage', paramstorage) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'storage') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'storage', paramstorage, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'storage', paramstorage, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid fonts_folder' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramfonts_folder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('fontsFolder', 'StartSavePresentation', paramfonts_folder, 'String') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'fontsFolder', paramfonts_folder) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'fontsFolder') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'fontsFolder', paramfonts_folder, 'String') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'fontsFolder', paramfonts_folder, 'String') expect(400).to eq(code) expect(e.message).to include(message) end end it 'invalid slides' do paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'StartSavePresentation', 'String') paramformat = AsposeSlidesCloud::SpecUtils.get_param_value('format', 'StartSavePresentation', 'String') paramout_path = AsposeSlidesCloud::SpecUtils.get_param_value('outPath', 'StartSavePresentation', 'String') paramoptions = AsposeSlidesCloud::SpecUtils.get_param_value('options', 'StartSavePresentation', 'ExportOptions') parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'StartSavePresentation', 'String') paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'StartSavePresentation', 'String') paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'StartSavePresentation', 'String') paramfonts_folder = AsposeSlidesCloud::SpecUtils.get_param_value('fontsFolder', 'StartSavePresentation', 'String') paramslides = AsposeSlidesCloud::SpecUtils.get_param_value('slides', 'StartSavePresentation', 'Integer[]') paramslides = AsposeSlidesCloud::SpecUtils.invalidize_param_value('slides', 'StartSavePresentation', paramslides, 'Integer[]') AsposeSlidesCloud::SpecUtils.initialize('StartSavePresentation', 'slides', paramslides) begin AsposeSlidesCloud::SpecUtils.testSlidesAsyncApi.start_save_presentation_with_http_info(paramname, paramformat, paramout_path, paramoptions, parampassword, paramfolder, paramstorage, paramfonts_folder, paramslides) unless AsposeSlidesCloud::SpecUtils.no_exception?('StartSavePresentation', 'slides') fail "An exception expected" end rescue AsposeSlidesCloud::ApiError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'slides', paramslides, 'Integer[]') expect(e.code).to eq(code) expect(e.response_body).to include(message) rescue ArgumentError => e code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('StartSavePresentation', 'slides', paramslides, 'Integer[]') expect(400).to eq(code) expect(e.message).to include(message) end end end end