aspose_slides_cloud 23.6.0 → 23.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +10 -0
- data/lib/aspose_slides_cloud/api/slides_api.rb +296 -11
- data/lib/aspose_slides_cloud/models/effect.rb +44 -2
- data/lib/aspose_slides_cloud/models/video_frame.rb +22 -2
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/api/slides_api_spec.rb +713 -3
- data/spec/use_cases/image_spec.rb +21 -0
- data/spec/use_cases/text_spec.rb +34 -0
- data/testRules.json +1 -1
- metadata +2 -2
data/spec/api/slides_api_spec.rb
CHANGED
@@ -7996,8 +7996,8 @@ describe 'SlidesApi' do
|
|
7996
7996
|
# @param name Document name.
|
7997
7997
|
# @param slide_index Parent slide index.
|
7998
7998
|
# @param slide_type Slide type (master, layout or notes).
|
7999
|
+
# @param dto Shape DTO.
|
7999
8000
|
# @param [Hash] opts the optional parameters
|
8000
|
-
# @option opts [ShapeBase] :dto Shape DTO.
|
8001
8001
|
# @option opts [Integer] :shape_to_clone Optional index for clone shape instead of adding a new one.
|
8002
8002
|
# @option opts [Integer] :position Position of the new shape in the list. Default is at the end of the list.
|
8003
8003
|
# @option opts [String] :password Document password.
|
@@ -13817,8 +13817,8 @@ describe 'SlidesApi' do
|
|
13817
13817
|
# unit tests for delete_protection_online
|
13818
13818
|
# Resets all presentation protection settings.
|
13819
13819
|
# @param document Document data.
|
13820
|
-
# @param password Presentation password.
|
13821
13820
|
# @param [Hash] opts the optional parameters
|
13821
|
+
# @option opts [String] :password Presentation password.
|
13822
13822
|
# @return [File]
|
13823
13823
|
describe 'delete_protection_online test' do
|
13824
13824
|
it 'should work' do
|
@@ -37968,6 +37968,295 @@ describe 'SlidesApi' do
|
|
37968
37968
|
end
|
37969
37969
|
end
|
37970
37970
|
|
37971
|
+
# unit tests for replace_image
|
37972
|
+
# Replaces image by the specified index.
|
37973
|
+
# @param name Document name.
|
37974
|
+
# @param image_index Image index.
|
37975
|
+
# @param [Hash] opts the optional parameters
|
37976
|
+
# @option opts [File] :image Image data.
|
37977
|
+
# @option opts [String] :password Document password.
|
37978
|
+
# @option opts [String] :folder Document folder.
|
37979
|
+
# @option opts [String] :storage Document storage.
|
37980
|
+
# @return [nil]
|
37981
|
+
describe 'replace_image test' do
|
37982
|
+
it 'should work' do
|
37983
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
37984
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
37985
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
37986
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
37987
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
37988
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
37989
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', nil, nil)
|
37990
|
+
o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
37991
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', nil, nil, nil)
|
37992
|
+
expect(c).to eq(code)
|
37993
|
+
end
|
37994
|
+
|
37995
|
+
it 'invalid name' do
|
37996
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
37997
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
37998
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
37999
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38000
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38001
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38002
|
+
paramname = AsposeSlidesCloud::SpecUtils.invalidize_param_value('name', 'ReplaceImage', paramname, 'String')
|
38003
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'name', paramname)
|
38004
|
+
begin
|
38005
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38006
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'name')
|
38007
|
+
fail "An exception expected"
|
38008
|
+
end
|
38009
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38010
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'name', paramname, 'String')
|
38011
|
+
expect(e.code).to eq(code)
|
38012
|
+
expect(e.response_body).to include(message)
|
38013
|
+
rescue ArgumentError => e
|
38014
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'name', paramname, 'String')
|
38015
|
+
expect(400).to eq(code)
|
38016
|
+
expect(e.message).to include(message)
|
38017
|
+
end
|
38018
|
+
end
|
38019
|
+
|
38020
|
+
it 'invalid image_index' do
|
38021
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
38022
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
38023
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
38024
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38025
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38026
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38027
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.invalidize_param_value('imageIndex', 'ReplaceImage', paramimage_index, 'Integer')
|
38028
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'imageIndex', paramimage_index)
|
38029
|
+
begin
|
38030
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38031
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'imageIndex')
|
38032
|
+
fail "An exception expected"
|
38033
|
+
end
|
38034
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38035
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'imageIndex', paramimage_index, 'Integer')
|
38036
|
+
expect(e.code).to eq(code)
|
38037
|
+
expect(e.response_body).to include(message)
|
38038
|
+
rescue ArgumentError => e
|
38039
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'imageIndex', paramimage_index, 'Integer')
|
38040
|
+
expect(400).to eq(code)
|
38041
|
+
expect(e.message).to include(message)
|
38042
|
+
end
|
38043
|
+
end
|
38044
|
+
|
38045
|
+
it 'invalid image' do
|
38046
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
38047
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
38048
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
38049
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38050
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38051
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38052
|
+
paramimage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('image', 'ReplaceImage', paramimage, 'File')
|
38053
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'image', paramimage)
|
38054
|
+
begin
|
38055
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38056
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'image')
|
38057
|
+
fail "An exception expected"
|
38058
|
+
end
|
38059
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38060
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'image', paramimage, 'File')
|
38061
|
+
expect(e.code).to eq(code)
|
38062
|
+
expect(e.response_body).to include(message)
|
38063
|
+
rescue ArgumentError => e
|
38064
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'image', paramimage, 'File')
|
38065
|
+
expect(400).to eq(code)
|
38066
|
+
expect(e.message).to include(message)
|
38067
|
+
end
|
38068
|
+
end
|
38069
|
+
|
38070
|
+
it 'invalid password' do
|
38071
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
38072
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
38073
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
38074
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38075
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38076
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38077
|
+
parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceImage', parampassword, 'String')
|
38078
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'password', parampassword)
|
38079
|
+
begin
|
38080
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38081
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'password')
|
38082
|
+
fail "An exception expected"
|
38083
|
+
end
|
38084
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38085
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'password', parampassword, 'String')
|
38086
|
+
expect(e.code).to eq(code)
|
38087
|
+
expect(e.response_body).to include(message)
|
38088
|
+
rescue ArgumentError => e
|
38089
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'password', parampassword, 'String')
|
38090
|
+
expect(400).to eq(code)
|
38091
|
+
expect(e.message).to include(message)
|
38092
|
+
end
|
38093
|
+
end
|
38094
|
+
|
38095
|
+
it 'invalid folder' do
|
38096
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
38097
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
38098
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
38099
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38100
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38101
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38102
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('folder', 'ReplaceImage', paramfolder, 'String')
|
38103
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'folder', paramfolder)
|
38104
|
+
begin
|
38105
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38106
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'folder')
|
38107
|
+
fail "An exception expected"
|
38108
|
+
end
|
38109
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38110
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'folder', paramfolder, 'String')
|
38111
|
+
expect(e.code).to eq(code)
|
38112
|
+
expect(e.response_body).to include(message)
|
38113
|
+
rescue ArgumentError => e
|
38114
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'folder', paramfolder, 'String')
|
38115
|
+
expect(400).to eq(code)
|
38116
|
+
expect(e.message).to include(message)
|
38117
|
+
end
|
38118
|
+
end
|
38119
|
+
|
38120
|
+
it 'invalid storage' do
|
38121
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceImage', 'String')
|
38122
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImage', 'Integer')
|
38123
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImage', 'File')
|
38124
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImage', 'String')
|
38125
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceImage', 'String')
|
38126
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceImage', 'String')
|
38127
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'ReplaceImage', paramstorage, 'String')
|
38128
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImage', 'storage', paramstorage)
|
38129
|
+
begin
|
38130
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_with_http_info(paramname, paramimage_index, paramimage, parampassword, paramfolder, paramstorage)
|
38131
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImage', 'storage')
|
38132
|
+
fail "An exception expected"
|
38133
|
+
end
|
38134
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38135
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'storage', paramstorage, 'String')
|
38136
|
+
expect(e.code).to eq(code)
|
38137
|
+
expect(e.response_body).to include(message)
|
38138
|
+
rescue ArgumentError => e
|
38139
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImage', 'storage', paramstorage, 'String')
|
38140
|
+
expect(400).to eq(code)
|
38141
|
+
expect(e.message).to include(message)
|
38142
|
+
end
|
38143
|
+
end
|
38144
|
+
end
|
38145
|
+
|
38146
|
+
# unit tests for replace_image_online
|
38147
|
+
# Replaces image by the specified index and returns updated document.
|
38148
|
+
# @param document Document data.
|
38149
|
+
# @param image_index Image index.
|
38150
|
+
# @param [Hash] opts the optional parameters
|
38151
|
+
# @option opts [File] :image Image data.
|
38152
|
+
# @option opts [String] :password Password.
|
38153
|
+
# @return [File]
|
38154
|
+
describe 'replace_image_online test' do
|
38155
|
+
it 'should work' do
|
38156
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceImageOnline', 'File')
|
38157
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImageOnline', 'Integer')
|
38158
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImageOnline', 'File')
|
38159
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImageOnline', 'String')
|
38160
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImageOnline', nil, nil)
|
38161
|
+
o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_image_online_with_http_info(paramdocument, paramimage_index, paramimage, parampassword)
|
38162
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', nil, nil, nil)
|
38163
|
+
expect(c).to eq(code)
|
38164
|
+
expect(o).not_to be_nil
|
38165
|
+
end
|
38166
|
+
|
38167
|
+
it 'invalid document' do
|
38168
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceImageOnline', 'File')
|
38169
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImageOnline', 'Integer')
|
38170
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImageOnline', 'File')
|
38171
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImageOnline', 'String')
|
38172
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.invalidize_param_value('document', 'ReplaceImageOnline', paramdocument, 'File')
|
38173
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImageOnline', 'document', paramdocument)
|
38174
|
+
begin
|
38175
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_online_with_http_info(paramdocument, paramimage_index, paramimage, parampassword)
|
38176
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImageOnline', 'document')
|
38177
|
+
fail "An exception expected"
|
38178
|
+
end
|
38179
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38180
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'document', paramdocument, 'File')
|
38181
|
+
expect(e.code).to eq(code)
|
38182
|
+
expect(e.response_body).to include(message)
|
38183
|
+
rescue ArgumentError => e
|
38184
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'document', paramdocument, 'File')
|
38185
|
+
expect(400).to eq(code)
|
38186
|
+
expect(e.message).to include(message)
|
38187
|
+
end
|
38188
|
+
end
|
38189
|
+
|
38190
|
+
it 'invalid image_index' do
|
38191
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceImageOnline', 'File')
|
38192
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImageOnline', 'Integer')
|
38193
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImageOnline', 'File')
|
38194
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImageOnline', 'String')
|
38195
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.invalidize_param_value('imageIndex', 'ReplaceImageOnline', paramimage_index, 'Integer')
|
38196
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImageOnline', 'imageIndex', paramimage_index)
|
38197
|
+
begin
|
38198
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_online_with_http_info(paramdocument, paramimage_index, paramimage, parampassword)
|
38199
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImageOnline', 'imageIndex')
|
38200
|
+
fail "An exception expected"
|
38201
|
+
end
|
38202
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38203
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'imageIndex', paramimage_index, 'Integer')
|
38204
|
+
expect(e.code).to eq(code)
|
38205
|
+
expect(e.response_body).to include(message)
|
38206
|
+
rescue ArgumentError => e
|
38207
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'imageIndex', paramimage_index, 'Integer')
|
38208
|
+
expect(400).to eq(code)
|
38209
|
+
expect(e.message).to include(message)
|
38210
|
+
end
|
38211
|
+
end
|
38212
|
+
|
38213
|
+
it 'invalid image' do
|
38214
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceImageOnline', 'File')
|
38215
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImageOnline', 'Integer')
|
38216
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImageOnline', 'File')
|
38217
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImageOnline', 'String')
|
38218
|
+
paramimage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('image', 'ReplaceImageOnline', paramimage, 'File')
|
38219
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImageOnline', 'image', paramimage)
|
38220
|
+
begin
|
38221
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_online_with_http_info(paramdocument, paramimage_index, paramimage, parampassword)
|
38222
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImageOnline', 'image')
|
38223
|
+
fail "An exception expected"
|
38224
|
+
end
|
38225
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38226
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'image', paramimage, 'File')
|
38227
|
+
expect(e.code).to eq(code)
|
38228
|
+
expect(e.response_body).to include(message)
|
38229
|
+
rescue ArgumentError => e
|
38230
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'image', paramimage, 'File')
|
38231
|
+
expect(400).to eq(code)
|
38232
|
+
expect(e.message).to include(message)
|
38233
|
+
end
|
38234
|
+
end
|
38235
|
+
|
38236
|
+
it 'invalid password' do
|
38237
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceImageOnline', 'File')
|
38238
|
+
paramimage_index = AsposeSlidesCloud::SpecUtils.get_param_value('imageIndex', 'ReplaceImageOnline', 'Integer')
|
38239
|
+
paramimage = AsposeSlidesCloud::SpecUtils.get_param_value('image', 'ReplaceImageOnline', 'File')
|
38240
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceImageOnline', 'String')
|
38241
|
+
parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceImageOnline', parampassword, 'String')
|
38242
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceImageOnline', 'password', parampassword)
|
38243
|
+
begin
|
38244
|
+
AsposeSlidesCloud::SpecUtils.api.replace_image_online_with_http_info(paramdocument, paramimage_index, paramimage, parampassword)
|
38245
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceImageOnline', 'password')
|
38246
|
+
fail "An exception expected"
|
38247
|
+
end
|
38248
|
+
rescue AsposeSlidesCloud::ApiError => e
|
38249
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'password', parampassword, 'String')
|
38250
|
+
expect(e.code).to eq(code)
|
38251
|
+
expect(e.response_body).to include(message)
|
38252
|
+
rescue ArgumentError => e
|
38253
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceImageOnline', 'password', parampassword, 'String')
|
38254
|
+
expect(400).to eq(code)
|
38255
|
+
expect(e.message).to include(message)
|
38256
|
+
end
|
38257
|
+
end
|
38258
|
+
end
|
38259
|
+
|
37971
38260
|
# unit tests for replace_presentation_text
|
37972
38261
|
# Replace text with a new value.
|
37973
38262
|
# @param name Document name.
|
@@ -38744,6 +39033,427 @@ describe 'SlidesApi' do
|
|
38744
39033
|
end
|
38745
39034
|
end
|
38746
39035
|
|
39036
|
+
# unit tests for replace_text_formatting
|
39037
|
+
# Finds and replaces text in presentation with given format.
|
39038
|
+
# @param name Document name.
|
39039
|
+
# @param old_value Text value to be replaced.
|
39040
|
+
# @param new_value Text value to replace with.
|
39041
|
+
# @param [Hash] opts the optional parameters
|
39042
|
+
# @option opts [PortionFormat] :portion_format Portion format.
|
39043
|
+
# @option opts [BOOLEAN] :with_masters Text replacement includes master slides.
|
39044
|
+
# @option opts [String] :password Document password.
|
39045
|
+
# @option opts [String] :folder Document folder.
|
39046
|
+
# @option opts [String] :storage Document storage.
|
39047
|
+
# @return [Document]
|
39048
|
+
describe 'replace_text_formatting test' do
|
39049
|
+
it 'should work' do
|
39050
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39051
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39052
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39053
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39054
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39055
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39056
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39057
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39058
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', nil, nil)
|
39059
|
+
o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39060
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', nil, nil, nil)
|
39061
|
+
expect(c).to eq(code)
|
39062
|
+
expect(o).not_to be_nil
|
39063
|
+
end
|
39064
|
+
|
39065
|
+
it 'invalid name' do
|
39066
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39067
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39068
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39069
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39070
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39071
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39072
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39073
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39074
|
+
paramname = AsposeSlidesCloud::SpecUtils.invalidize_param_value('name', 'ReplaceTextFormatting', paramname, 'String')
|
39075
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'name', paramname)
|
39076
|
+
begin
|
39077
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39078
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'name')
|
39079
|
+
fail "An exception expected"
|
39080
|
+
end
|
39081
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39082
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'name', paramname, 'String')
|
39083
|
+
expect(e.code).to eq(code)
|
39084
|
+
expect(e.response_body).to include(message)
|
39085
|
+
rescue ArgumentError => e
|
39086
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'name', paramname, 'String')
|
39087
|
+
expect(400).to eq(code)
|
39088
|
+
expect(e.message).to include(message)
|
39089
|
+
end
|
39090
|
+
end
|
39091
|
+
|
39092
|
+
it 'invalid old_value' do
|
39093
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39094
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39095
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39096
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39097
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39098
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39099
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39100
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39101
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('oldValue', 'ReplaceTextFormatting', paramold_value, 'String')
|
39102
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'oldValue', paramold_value)
|
39103
|
+
begin
|
39104
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39105
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'oldValue')
|
39106
|
+
fail "An exception expected"
|
39107
|
+
end
|
39108
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39109
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'oldValue', paramold_value, 'String')
|
39110
|
+
expect(e.code).to eq(code)
|
39111
|
+
expect(e.response_body).to include(message)
|
39112
|
+
rescue ArgumentError => e
|
39113
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'oldValue', paramold_value, 'String')
|
39114
|
+
expect(400).to eq(code)
|
39115
|
+
expect(e.message).to include(message)
|
39116
|
+
end
|
39117
|
+
end
|
39118
|
+
|
39119
|
+
it 'invalid new_value' do
|
39120
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39121
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39122
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39123
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39124
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39125
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39126
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39127
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39128
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('newValue', 'ReplaceTextFormatting', paramnew_value, 'String')
|
39129
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'newValue', paramnew_value)
|
39130
|
+
begin
|
39131
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39132
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'newValue')
|
39133
|
+
fail "An exception expected"
|
39134
|
+
end
|
39135
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39136
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'newValue', paramnew_value, 'String')
|
39137
|
+
expect(e.code).to eq(code)
|
39138
|
+
expect(e.response_body).to include(message)
|
39139
|
+
rescue ArgumentError => e
|
39140
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'newValue', paramnew_value, 'String')
|
39141
|
+
expect(400).to eq(code)
|
39142
|
+
expect(e.message).to include(message)
|
39143
|
+
end
|
39144
|
+
end
|
39145
|
+
|
39146
|
+
it 'invalid portion_format' do
|
39147
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39148
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39149
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39150
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39151
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39152
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39153
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39154
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39155
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.invalidize_param_value('portionFormat', 'ReplaceTextFormatting', paramportion_format, 'PortionFormat')
|
39156
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'portionFormat', paramportion_format)
|
39157
|
+
begin
|
39158
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39159
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'portionFormat')
|
39160
|
+
fail "An exception expected"
|
39161
|
+
end
|
39162
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39163
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'portionFormat', paramportion_format, 'PortionFormat')
|
39164
|
+
expect(e.code).to eq(code)
|
39165
|
+
expect(e.response_body).to include(message)
|
39166
|
+
rescue ArgumentError => e
|
39167
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'portionFormat', paramportion_format, 'PortionFormat')
|
39168
|
+
expect(400).to eq(code)
|
39169
|
+
expect(e.message).to include(message)
|
39170
|
+
end
|
39171
|
+
end
|
39172
|
+
|
39173
|
+
it 'invalid with_masters' do
|
39174
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39175
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39176
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39177
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39178
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39179
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39180
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39181
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39182
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.invalidize_param_value('withMasters', 'ReplaceTextFormatting', paramwith_masters, 'BOOLEAN')
|
39183
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'withMasters', paramwith_masters)
|
39184
|
+
begin
|
39185
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39186
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'withMasters')
|
39187
|
+
fail "An exception expected"
|
39188
|
+
end
|
39189
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39190
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'withMasters', paramwith_masters, 'BOOLEAN')
|
39191
|
+
expect(e.code).to eq(code)
|
39192
|
+
expect(e.response_body).to include(message)
|
39193
|
+
rescue ArgumentError => e
|
39194
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'withMasters', paramwith_masters, 'BOOLEAN')
|
39195
|
+
expect(400).to eq(code)
|
39196
|
+
expect(e.message).to include(message)
|
39197
|
+
end
|
39198
|
+
end
|
39199
|
+
|
39200
|
+
it 'invalid password' do
|
39201
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39202
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39203
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39204
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39205
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39206
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39207
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39208
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39209
|
+
parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceTextFormatting', parampassword, 'String')
|
39210
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'password', parampassword)
|
39211
|
+
begin
|
39212
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39213
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'password')
|
39214
|
+
fail "An exception expected"
|
39215
|
+
end
|
39216
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39217
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'password', parampassword, 'String')
|
39218
|
+
expect(e.code).to eq(code)
|
39219
|
+
expect(e.response_body).to include(message)
|
39220
|
+
rescue ArgumentError => e
|
39221
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'password', parampassword, 'String')
|
39222
|
+
expect(400).to eq(code)
|
39223
|
+
expect(e.message).to include(message)
|
39224
|
+
end
|
39225
|
+
end
|
39226
|
+
|
39227
|
+
it 'invalid folder' do
|
39228
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39229
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39230
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39231
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39232
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39233
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39234
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39235
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39236
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.invalidize_param_value('folder', 'ReplaceTextFormatting', paramfolder, 'String')
|
39237
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'folder', paramfolder)
|
39238
|
+
begin
|
39239
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39240
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'folder')
|
39241
|
+
fail "An exception expected"
|
39242
|
+
end
|
39243
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39244
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'folder', paramfolder, 'String')
|
39245
|
+
expect(e.code).to eq(code)
|
39246
|
+
expect(e.response_body).to include(message)
|
39247
|
+
rescue ArgumentError => e
|
39248
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'folder', paramfolder, 'String')
|
39249
|
+
expect(400).to eq(code)
|
39250
|
+
expect(e.message).to include(message)
|
39251
|
+
end
|
39252
|
+
end
|
39253
|
+
|
39254
|
+
it 'invalid storage' do
|
39255
|
+
paramname = AsposeSlidesCloud::SpecUtils.get_param_value('name', 'ReplaceTextFormatting', 'String')
|
39256
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormatting', 'String')
|
39257
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormatting', 'String')
|
39258
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormatting', 'PortionFormat')
|
39259
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormatting', 'BOOLEAN')
|
39260
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormatting', 'String')
|
39261
|
+
paramfolder = AsposeSlidesCloud::SpecUtils.get_param_value('folder', 'ReplaceTextFormatting', 'String')
|
39262
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.get_param_value('storage', 'ReplaceTextFormatting', 'String')
|
39263
|
+
paramstorage = AsposeSlidesCloud::SpecUtils.invalidize_param_value('storage', 'ReplaceTextFormatting', paramstorage, 'String')
|
39264
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormatting', 'storage', paramstorage)
|
39265
|
+
begin
|
39266
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_with_http_info(paramname, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword, paramfolder, paramstorage)
|
39267
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormatting', 'storage')
|
39268
|
+
fail "An exception expected"
|
39269
|
+
end
|
39270
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39271
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'storage', paramstorage, 'String')
|
39272
|
+
expect(e.code).to eq(code)
|
39273
|
+
expect(e.response_body).to include(message)
|
39274
|
+
rescue ArgumentError => e
|
39275
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormatting', 'storage', paramstorage, 'String')
|
39276
|
+
expect(400).to eq(code)
|
39277
|
+
expect(e.message).to include(message)
|
39278
|
+
end
|
39279
|
+
end
|
39280
|
+
end
|
39281
|
+
|
39282
|
+
# unit tests for replace_text_formatting_online
|
39283
|
+
# Finds and replaces text in presentation with given format.
|
39284
|
+
# @param document Document data.
|
39285
|
+
# @param old_value Text value to be replaced.
|
39286
|
+
# @param new_value Text value to replace with.
|
39287
|
+
# @param [Hash] opts the optional parameters
|
39288
|
+
# @option opts [PortionFormat] :portion_format Portion format.
|
39289
|
+
# @option opts [BOOLEAN] :with_masters Text replacement includes master slides.
|
39290
|
+
# @option opts [String] :password Document password.
|
39291
|
+
# @return [File]
|
39292
|
+
describe 'replace_text_formatting_online test' do
|
39293
|
+
it 'should work' do
|
39294
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39295
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39296
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39297
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39298
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39299
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39300
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', nil, nil)
|
39301
|
+
o, c, _h = AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39302
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', nil, nil, nil)
|
39303
|
+
expect(c).to eq(code)
|
39304
|
+
end
|
39305
|
+
|
39306
|
+
it 'invalid document' do
|
39307
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39308
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39309
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39310
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39311
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39312
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39313
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.invalidize_param_value('document', 'ReplaceTextFormattingOnline', paramdocument, 'File')
|
39314
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'document', paramdocument)
|
39315
|
+
begin
|
39316
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39317
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'document')
|
39318
|
+
fail "An exception expected"
|
39319
|
+
end
|
39320
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39321
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'document', paramdocument, 'File')
|
39322
|
+
expect(e.code).to eq(code)
|
39323
|
+
expect(e.response_body).to include(message)
|
39324
|
+
rescue ArgumentError => e
|
39325
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'document', paramdocument, 'File')
|
39326
|
+
expect(400).to eq(code)
|
39327
|
+
expect(e.message).to include(message)
|
39328
|
+
end
|
39329
|
+
end
|
39330
|
+
|
39331
|
+
it 'invalid old_value' do
|
39332
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39333
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39334
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39335
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39336
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39337
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39338
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('oldValue', 'ReplaceTextFormattingOnline', paramold_value, 'String')
|
39339
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'oldValue', paramold_value)
|
39340
|
+
begin
|
39341
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39342
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'oldValue')
|
39343
|
+
fail "An exception expected"
|
39344
|
+
end
|
39345
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39346
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'oldValue', paramold_value, 'String')
|
39347
|
+
expect(e.code).to eq(code)
|
39348
|
+
expect(e.response_body).to include(message)
|
39349
|
+
rescue ArgumentError => e
|
39350
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'oldValue', paramold_value, 'String')
|
39351
|
+
expect(400).to eq(code)
|
39352
|
+
expect(e.message).to include(message)
|
39353
|
+
end
|
39354
|
+
end
|
39355
|
+
|
39356
|
+
it 'invalid new_value' do
|
39357
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39358
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39359
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39360
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39361
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39362
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39363
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.invalidize_param_value('newValue', 'ReplaceTextFormattingOnline', paramnew_value, 'String')
|
39364
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'newValue', paramnew_value)
|
39365
|
+
begin
|
39366
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39367
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'newValue')
|
39368
|
+
fail "An exception expected"
|
39369
|
+
end
|
39370
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39371
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'newValue', paramnew_value, 'String')
|
39372
|
+
expect(e.code).to eq(code)
|
39373
|
+
expect(e.response_body).to include(message)
|
39374
|
+
rescue ArgumentError => e
|
39375
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'newValue', paramnew_value, 'String')
|
39376
|
+
expect(400).to eq(code)
|
39377
|
+
expect(e.message).to include(message)
|
39378
|
+
end
|
39379
|
+
end
|
39380
|
+
|
39381
|
+
it 'invalid portion_format' do
|
39382
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39383
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39384
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39385
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39386
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39387
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39388
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.invalidize_param_value('portionFormat', 'ReplaceTextFormattingOnline', paramportion_format, 'PortionFormat')
|
39389
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format)
|
39390
|
+
begin
|
39391
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39392
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'portionFormat')
|
39393
|
+
fail "An exception expected"
|
39394
|
+
end
|
39395
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39396
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format, 'PortionFormat')
|
39397
|
+
expect(e.code).to eq(code)
|
39398
|
+
expect(e.response_body).to include(message)
|
39399
|
+
rescue ArgumentError => e
|
39400
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'portionFormat', paramportion_format, 'PortionFormat')
|
39401
|
+
expect(400).to eq(code)
|
39402
|
+
expect(e.message).to include(message)
|
39403
|
+
end
|
39404
|
+
end
|
39405
|
+
|
39406
|
+
it 'invalid with_masters' do
|
39407
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39408
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39409
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39410
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39411
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39412
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39413
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.invalidize_param_value('withMasters', 'ReplaceTextFormattingOnline', paramwith_masters, 'BOOLEAN')
|
39414
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters)
|
39415
|
+
begin
|
39416
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39417
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'withMasters')
|
39418
|
+
fail "An exception expected"
|
39419
|
+
end
|
39420
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39421
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters, 'BOOLEAN')
|
39422
|
+
expect(e.code).to eq(code)
|
39423
|
+
expect(e.response_body).to include(message)
|
39424
|
+
rescue ArgumentError => e
|
39425
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'withMasters', paramwith_masters, 'BOOLEAN')
|
39426
|
+
expect(400).to eq(code)
|
39427
|
+
expect(e.message).to include(message)
|
39428
|
+
end
|
39429
|
+
end
|
39430
|
+
|
39431
|
+
it 'invalid password' do
|
39432
|
+
paramdocument = AsposeSlidesCloud::SpecUtils.get_param_value('document', 'ReplaceTextFormattingOnline', 'File')
|
39433
|
+
paramold_value = AsposeSlidesCloud::SpecUtils.get_param_value('oldValue', 'ReplaceTextFormattingOnline', 'String')
|
39434
|
+
paramnew_value = AsposeSlidesCloud::SpecUtils.get_param_value('newValue', 'ReplaceTextFormattingOnline', 'String')
|
39435
|
+
paramportion_format = AsposeSlidesCloud::SpecUtils.get_param_value('portionFormat', 'ReplaceTextFormattingOnline', 'PortionFormat')
|
39436
|
+
paramwith_masters = AsposeSlidesCloud::SpecUtils.get_param_value('withMasters', 'ReplaceTextFormattingOnline', 'BOOLEAN')
|
39437
|
+
parampassword = AsposeSlidesCloud::SpecUtils.get_param_value('password', 'ReplaceTextFormattingOnline', 'String')
|
39438
|
+
parampassword = AsposeSlidesCloud::SpecUtils.invalidize_param_value('password', 'ReplaceTextFormattingOnline', parampassword, 'String')
|
39439
|
+
AsposeSlidesCloud::SpecUtils.initialize('ReplaceTextFormattingOnline', 'password', parampassword)
|
39440
|
+
begin
|
39441
|
+
AsposeSlidesCloud::SpecUtils.api.replace_text_formatting_online_with_http_info(paramdocument, paramold_value, paramnew_value, paramportion_format, paramwith_masters, parampassword)
|
39442
|
+
unless AsposeSlidesCloud::SpecUtils.no_exception?('ReplaceTextFormattingOnline', 'password')
|
39443
|
+
fail "An exception expected"
|
39444
|
+
end
|
39445
|
+
rescue AsposeSlidesCloud::ApiError => e
|
39446
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'password', parampassword, 'String')
|
39447
|
+
expect(e.code).to eq(code)
|
39448
|
+
expect(e.response_body).to include(message)
|
39449
|
+
rescue ArgumentError => e
|
39450
|
+
code, message = AsposeSlidesCloud::SpecUtils.get_expected_error('ReplaceTextFormattingOnline', 'password', parampassword, 'String')
|
39451
|
+
expect(400).to eq(code)
|
39452
|
+
expect(e.message).to include(message)
|
39453
|
+
end
|
39454
|
+
end
|
39455
|
+
end
|
39456
|
+
|
38747
39457
|
# unit tests for save_portion_as_math_ml
|
38748
39458
|
# Convert Mathematical Text to MathML Format and saves result to the storage
|
38749
39459
|
# @param name Document name.
|
@@ -52600,8 +53310,8 @@ describe 'SlidesApi' do
|
|
52600
53310
|
# Update VBA module.
|
52601
53311
|
# @param name Document name.
|
52602
53312
|
# @param module_index The index of the macros module to remove.
|
53313
|
+
# @param module_dto VBA module DTO.
|
52603
53314
|
# @param [Hash] opts the optional parameters
|
52604
|
-
# @option opts [VbaModule] :module_dto VBA module DTO.
|
52605
53315
|
# @option opts [String] :password Document password.
|
52606
53316
|
# @option opts [String] :folder Document folder.
|
52607
53317
|
# @option opts [String] :storage Document storage.
|