aspose_html 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +92 -0
- data/LICENSE +21 -0
- data/README.md +181 -0
- data/Rakefile +8 -0
- data/aspose_html.gemspec +58 -0
- data/docs/ConversionApi.md +837 -0
- data/docs/DocumentApi.md +386 -0
- data/docs/OcrApi.md +128 -0
- data/docs/SummarizationApi.md +111 -0
- data/docs/TranslationApi.md +126 -0
- data/docs/storage/DiscUsage.md +9 -0
- data/docs/storage/DiscUsageResponse.md +10 -0
- data/docs/storage/FileApi.md +240 -0
- data/docs/storage/FileDetail.md +13 -0
- data/docs/storage/FileDetailsResponse.md +10 -0
- data/docs/storage/FileExist.md +9 -0
- data/docs/storage/FileExistResponse.md +10 -0
- data/docs/storage/FileVersion.md +15 -0
- data/docs/storage/FileVersionsResponse.md +10 -0
- data/docs/storage/FolderApi.md +229 -0
- data/docs/storage/MessageResponse.md +9 -0
- data/docs/storage/MoveFileResponse.md +9 -0
- data/docs/storage/MoveFolderResponse.md +9 -0
- data/docs/storage/RemoveFileResponse.md +9 -0
- data/docs/storage/RemoveFolderResponse.md +9 -0
- data/docs/storage/StorageApi.md +217 -0
- data/docs/storage/StorageExistResponse.md +10 -0
- data/lib/aspose_html.rb +68 -0
- data/lib/aspose_html/api/html_api.rb +1900 -0
- data/lib/aspose_html/api/storage_api.rb +774 -0
- data/lib/aspose_html/api_client.rb +386 -0
- data/lib/aspose_html/api_error.rb +54 -0
- data/lib/aspose_html/configuration.rb +175 -0
- data/lib/aspose_html/models/disc_usage.rb +223 -0
- data/lib/aspose_html/models/disc_usage_response.rb +260 -0
- data/lib/aspose_html/models/file_detail.rb +254 -0
- data/lib/aspose_html/models/file_details_response.rb +262 -0
- data/lib/aspose_html/models/file_exist.rb +223 -0
- data/lib/aspose_html/models/file_exist_response.rb +274 -0
- data/lib/aspose_html/models/file_version.rb +273 -0
- data/lib/aspose_html/models/file_versions_response.rb +262 -0
- data/lib/aspose_html/models/message_response.rb +251 -0
- data/lib/aspose_html/models/move_file_response.rb +251 -0
- data/lib/aspose_html/models/move_folder_response.rb +251 -0
- data/lib/aspose_html/models/remove_file_response.rb +251 -0
- data/lib/aspose_html/models/remove_folder_response.rb +251 -0
- data/lib/aspose_html/models/storage_exist_response.rb +260 -0
- data/lib/aspose_html/version.rb +31 -0
- data/spec/api/html_api_spec.rb +971 -0
- data/spec/api/model_spec.rb +622 -0
- data/spec/api/storage_api_spec.rb +596 -0
- data/spec/spec_helper.rb +169 -0
- data/testdata/test.txt +1 -0
- data/testdata/test1.html +19 -0
- data/testdata/test1.html.zip +0 -0
- data/testdata/test2.html +46 -0
- data/testdata/test2.html.zip +0 -0
- data/testdata/test3.html.zip +0 -0
- data/testdata/test4.html.zip +0 -0
- data/testdata/test_download.jpg +0 -0
- data/testdata/test_en.html +46 -0
- data/testdata/test_for_delete.html +46 -0
- data/testdata/test_for_move.html +46 -0
- data/testdata/test_get_doc.zip +0 -0
- data/testdata/test_ocr.jpg +0 -0
- data/testdata/test_ocr.png +0 -0
- data/testdata/test_put_create.html +19 -0
- data/testdata/test_put_create.jpg +0 -0
- data/testresult/Convert_html.bmp +0 -0
- data/testresult/Convert_html.pdf +0 -0
- data/testresult/Convert_html.xps +0 -0
- data/testresult/Convert_url.pdf +0 -0
- data/testresult/Convert_url.png +0 -0
- data/testresult/Convert_url.xps +0 -0
- data/testresult/Get_document.zip +0 -0
- data/testresult/Get_fragment_css_by_url.html +447 -0
- data/testresult/Get_fragment_doc.html +9 -0
- data/testresult/Get_fragment_doc_css.html +9 -0
- data/testresult/Get_fragment_xpath_by_url.html +38 -0
- data/testresult/Get_images_doc.zip +0 -0
- data/testresult/Get_images_from_url.zip +0 -0
- data/testresult/Keyword_by_doc.json +1 -0
- data/testresult/Keyword_by_url.json +1 -0
- data/testresult/Recognize_en_png.html +10 -0
- data/testresult/Translate_url_en_fr.zip +0 -0
- data/testresult/putTest.pdf +0 -0
- data/testresult/putTest.png +0 -0
- data/testresult/putTest.xps +0 -0
- data/testresult/putTestDoc.pdf +0 -0
- data/testresult/putTestDoc.tiff +0 -0
- data/testresult/putTestDoc.xps +0 -0
- data/testresult/test_download.jpg +0 -0
- metadata +320 -0
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
=begin
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
<copyright company="Aspose" file="model_spec.rb">
|
|
5
|
+
</copyright>
|
|
6
|
+
Copyright (c) 2018 Aspose.HTML for Cloud
|
|
7
|
+
<summary>
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
</summary>
|
|
26
|
+
--------------------------------------------------------------------------------------------------------------------
|
|
27
|
+
=end
|
|
28
|
+
|
|
29
|
+
require 'spec_helper'
|
|
30
|
+
require 'json'
|
|
31
|
+
require 'date'
|
|
32
|
+
|
|
33
|
+
describe 'Test models' do
|
|
34
|
+
|
|
35
|
+
describe 'DiscUsage' do
|
|
36
|
+
before(:all) do
|
|
37
|
+
# run before all test
|
|
38
|
+
@instance1 = AsposeHtml::DiscUsage.new({UsedSize: 100, TotalSize: 200})
|
|
39
|
+
@instance2 = AsposeHtml::DiscUsage.new({UsedSize: 100, TotalSize: 200})
|
|
40
|
+
@instance3 = AsposeHtml::DiscUsage.new({UsedSize: 200, TotalSize: 300})
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
it 'should create an instance of DiscUsage' do
|
|
44
|
+
expect(@instance1).to be_instance_of(AsposeHtml::DiscUsage)
|
|
45
|
+
expect(@instance2).to be_instance_of(AsposeHtml::DiscUsage)
|
|
46
|
+
expect(@instance3).to be_instance_of(AsposeHtml::DiscUsage)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'check class names' do
|
|
50
|
+
expect(@instance1.used_size).to be_instance_of(Integer)
|
|
51
|
+
expect(@instance2.used_size).to be_instance_of(Integer)
|
|
52
|
+
expect(@instance3.used_size).to be_instance_of(Integer)
|
|
53
|
+
|
|
54
|
+
expect(@instance1.total_size).to be_instance_of(Integer)
|
|
55
|
+
expect(@instance2.total_size).to be_instance_of(Integer)
|
|
56
|
+
expect(@instance3.total_size).to be_instance_of(Integer)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it 'check compare and keys' do
|
|
60
|
+
dictionary = @instance3.to_hash
|
|
61
|
+
expect(dictionary.has_key?(:UsedSize)).to be true
|
|
62
|
+
expect(dictionary.has_key?(:TotalSize)).to be true
|
|
63
|
+
expect(@instance1).to eql(@instance2)
|
|
64
|
+
expect(@instance1).not_to eql(@instance3)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
describe 'DiscUsageResponse' do
|
|
69
|
+
before(:all) do
|
|
70
|
+
# run before all test
|
|
71
|
+
disc_usage1 = AsposeHtml::DiscUsage.new({UsedSize: 100, TotalSize: 200})
|
|
72
|
+
disc_usage2 = AsposeHtml::DiscUsage.new({UsedSize: 100, TotalSize: 200})
|
|
73
|
+
disc_usage3 = AsposeHtml::DiscUsage.new({UsedSize: 200, TotalSize: 300})
|
|
74
|
+
@instance1 = AsposeHtml::DiscUsageResponse.new( {Code: 200, Status: "OK", DiscUsage: disc_usage1})
|
|
75
|
+
@instance2 = AsposeHtml::DiscUsageResponse.new( {Code: 200, Status: "OK", DiscUsage: disc_usage2})
|
|
76
|
+
@instance3 = AsposeHtml::DiscUsageResponse.new( {Code: 200, Status: "OK", DiscUsage: disc_usage3})
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
it 'should create an instance of DiscUsageResponse' do
|
|
80
|
+
expect(@instance1).to be_instance_of(AsposeHtml::DiscUsageResponse)
|
|
81
|
+
expect(@instance2).to be_instance_of(AsposeHtml::DiscUsageResponse)
|
|
82
|
+
expect(@instance3).to be_instance_of(AsposeHtml::DiscUsageResponse)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
it 'check class names' do
|
|
86
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
87
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
88
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
89
|
+
|
|
90
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
91
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
92
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
93
|
+
|
|
94
|
+
expect(@instance1.disc_usage).to be_instance_of(AsposeHtml::DiscUsage)
|
|
95
|
+
expect(@instance2.disc_usage).to be_instance_of(AsposeHtml::DiscUsage)
|
|
96
|
+
expect(@instance3.disc_usage).to be_instance_of(AsposeHtml::DiscUsage)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
it 'check compare and keys' do
|
|
100
|
+
dictionary = @instance3.to_hash
|
|
101
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
102
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
103
|
+
expect(dictionary.has_key?(:DiscUsage)).to be true
|
|
104
|
+
|
|
105
|
+
expect(@instance1).to eql(@instance2)
|
|
106
|
+
expect(@instance1).not_to eql(@instance3)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
describe 'FileExist' do
|
|
111
|
+
before(:all) do
|
|
112
|
+
# run before all test
|
|
113
|
+
@instance1 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
114
|
+
@instance2 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
115
|
+
@instance3 = AsposeHtml::FileExist.new({IsExist: true, IsFolder: false})
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
it 'should create an instance of FileExist' do
|
|
119
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileExist)
|
|
120
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileExist)
|
|
121
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileExist)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
it 'check class names' do
|
|
125
|
+
expect(@instance1.is_exist).to be false
|
|
126
|
+
expect(@instance2.is_exist).to be false
|
|
127
|
+
expect(@instance3.is_exist).to be true
|
|
128
|
+
|
|
129
|
+
expect(@instance1.is_folder).to be false
|
|
130
|
+
expect(@instance2.is_folder).to be false
|
|
131
|
+
expect(@instance3.is_folder).to be false
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
it 'check compare and keys' do
|
|
135
|
+
dictionary = @instance3.to_hash
|
|
136
|
+
expect(dictionary.has_key?(:IsExist)).to be true
|
|
137
|
+
expect(dictionary.has_key?(:IsFolder)).to be true
|
|
138
|
+
expect(@instance1).to eql(@instance2)
|
|
139
|
+
expect(@instance1).not_to eql(@instance3)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
describe 'FileExistResponse' do
|
|
144
|
+
before(:all) do
|
|
145
|
+
# run before all test
|
|
146
|
+
f1 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
147
|
+
f2 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
148
|
+
f3 = AsposeHtml::FileExist.new({IsExist: true, IsFolder: false})
|
|
149
|
+
|
|
150
|
+
@instance1 = AsposeHtml::FileExistResponse.new({Code: 200, Status: "OK", FileExist: f1})
|
|
151
|
+
@instance2 = AsposeHtml::FileExistResponse.new({Code: 200, Status: "OK", FileExist: f2})
|
|
152
|
+
@instance3 = AsposeHtml::FileExistResponse.new({Code: 200, Status: "OK", FileExist: f3})
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
it 'should create an instance of FileExistResponse' do
|
|
156
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileExistResponse)
|
|
157
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileExistResponse)
|
|
158
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileExistResponse)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
it 'check class names' do
|
|
162
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
163
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
164
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
165
|
+
|
|
166
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
167
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
168
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
169
|
+
|
|
170
|
+
expect(@instance1.file_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
171
|
+
expect(@instance2.file_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
172
|
+
expect(@instance3.file_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
it 'check compare and keys' do
|
|
176
|
+
dictionary = @instance3.to_hash
|
|
177
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
178
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
179
|
+
expect(dictionary.has_key?(:FileExist)).to be true
|
|
180
|
+
|
|
181
|
+
expect(@instance1).to eql(@instance2)
|
|
182
|
+
expect(@instance1).not_to eql(@instance3)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
describe 'FileDetail' do
|
|
187
|
+
before(:all) do
|
|
188
|
+
# run before all test
|
|
189
|
+
time_now = DateTime.now.to_s
|
|
190
|
+
@instance1 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: false, ModifiedDate: time_now,
|
|
191
|
+
Size: 100, Path: '~/user/test_path'})
|
|
192
|
+
@instance2 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: false, ModifiedDate: time_now,
|
|
193
|
+
Size: 100, Path: '~/user/test_path'})
|
|
194
|
+
@instance3 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: true, ModifiedDate: time_now,
|
|
195
|
+
Size: 100, Path: '~/user/test_path'})
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
it 'should create an instance of FileDetail' do
|
|
199
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileDetail)
|
|
200
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileDetail)
|
|
201
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileDetail)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
it 'check class names' do
|
|
205
|
+
expect(@instance1.name).to be_instance_of(String)
|
|
206
|
+
expect(@instance2.name).to be_instance_of(String)
|
|
207
|
+
expect(@instance3.name).to be_instance_of(String)
|
|
208
|
+
|
|
209
|
+
expect(@instance1.is_folder).to be false
|
|
210
|
+
expect(@instance2.is_folder).to be false
|
|
211
|
+
expect(@instance3.is_folder).to be true
|
|
212
|
+
|
|
213
|
+
expect(@instance1.modified_date).to be_instance_of(String)
|
|
214
|
+
expect(@instance2.modified_date).to be_instance_of(String)
|
|
215
|
+
expect(@instance3.modified_date).to be_instance_of(String)
|
|
216
|
+
|
|
217
|
+
expect(@instance1.size).to be_instance_of(Integer)
|
|
218
|
+
expect(@instance2.size).to be_instance_of(Integer)
|
|
219
|
+
expect(@instance3.size).to be_instance_of(Integer)
|
|
220
|
+
|
|
221
|
+
expect(@instance1.path).to be_instance_of(String)
|
|
222
|
+
expect(@instance2.path).to be_instance_of(String)
|
|
223
|
+
expect(@instance3.path).to be_instance_of(String)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
it 'check compare and keys' do
|
|
227
|
+
dictionary = @instance3.to_hash
|
|
228
|
+
expect(dictionary.has_key?(:Name)).to be true
|
|
229
|
+
expect(dictionary.has_key?(:IsFolder)).to be true
|
|
230
|
+
expect(dictionary.has_key?(:ModifiedDate)).to be true
|
|
231
|
+
expect(dictionary.has_key?(:Size)).to be true
|
|
232
|
+
expect(dictionary.has_key?(:Path)).to be true
|
|
233
|
+
|
|
234
|
+
expect(@instance1).to eql(@instance2)
|
|
235
|
+
expect(@instance1).not_to eql(@instance3)
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
describe 'FileVersion' do
|
|
240
|
+
before(:all) do
|
|
241
|
+
# run before all test
|
|
242
|
+
time_now = DateTime.now.to_s
|
|
243
|
+
@instance1 = AsposeHtml::FileVersion.new({VersionId: "1.0.1", IsLatest: false, Name: 'test',
|
|
244
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
245
|
+
@instance2 = AsposeHtml::FileVersion.new({VersionId: "1.0.1", IsLatest: false, Name: 'test',
|
|
246
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
247
|
+
@instance3 = AsposeHtml::FileVersion.new({VersionId: "1.0.1", IsLatest: true, Name: 'test',
|
|
248
|
+
IsFolder: true, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
it 'should create an instance of FileVersion' do
|
|
252
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileVersion)
|
|
253
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileVersion)
|
|
254
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileVersion)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
it 'check class names' do
|
|
258
|
+
expect(@instance1.version_id).to be_instance_of(String)
|
|
259
|
+
expect(@instance2.version_id).to be_instance_of(String)
|
|
260
|
+
expect(@instance3.version_id).to be_instance_of(String)
|
|
261
|
+
|
|
262
|
+
expect(@instance1.is_latest).to be false
|
|
263
|
+
expect(@instance2.is_latest).to be false
|
|
264
|
+
expect(@instance3.is_latest).to be true
|
|
265
|
+
|
|
266
|
+
expect(@instance1.name).to be_instance_of(String)
|
|
267
|
+
expect(@instance2.name).to be_instance_of(String)
|
|
268
|
+
expect(@instance3.name).to be_instance_of(String)
|
|
269
|
+
|
|
270
|
+
expect(@instance1.is_folder).to be false
|
|
271
|
+
expect(@instance2.is_folder).to be false
|
|
272
|
+
expect(@instance3.is_folder).to be true
|
|
273
|
+
|
|
274
|
+
expect(@instance1.modified_date).to be_instance_of(String)
|
|
275
|
+
expect(@instance2.modified_date).to be_instance_of(String)
|
|
276
|
+
expect(@instance3.modified_date).to be_instance_of(String)
|
|
277
|
+
|
|
278
|
+
expect(@instance1.size).to be_instance_of(Integer)
|
|
279
|
+
expect(@instance2.size).to be_instance_of(Integer)
|
|
280
|
+
expect(@instance3.size).to be_instance_of(Integer)
|
|
281
|
+
|
|
282
|
+
expect(@instance1.path).to be_instance_of(String)
|
|
283
|
+
expect(@instance2.path).to be_instance_of(String)
|
|
284
|
+
expect(@instance3.path).to be_instance_of(String)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
it 'check compare and keys' do
|
|
288
|
+
dictionary = @instance3.to_hash
|
|
289
|
+
expect(dictionary.has_key?(:VersionId)).to be true
|
|
290
|
+
expect(dictionary.has_key?(:IsLatest)).to be true
|
|
291
|
+
expect(dictionary.has_key?(:Name)).to be true
|
|
292
|
+
expect(dictionary.has_key?(:IsFolder)).to be true
|
|
293
|
+
expect(dictionary.has_key?(:ModifiedDate)).to be true
|
|
294
|
+
expect(dictionary.has_key?(:Size)).to be true
|
|
295
|
+
expect(dictionary.has_key?(:Path)).to be true
|
|
296
|
+
|
|
297
|
+
expect(@instance1).to eql(@instance2)
|
|
298
|
+
expect(@instance1).not_to eql(@instance3)
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
describe 'FileVersionsResponse' do
|
|
303
|
+
before(:all) do
|
|
304
|
+
# run before all test
|
|
305
|
+
time_now = DateTime.now.to_s
|
|
306
|
+
v1 = AsposeHtml::FileVersion.new({VersionId: "1.0.1", IsLatest: false, Name: 'test',
|
|
307
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
308
|
+
v2 = AsposeHtml::FileVersion.new({VersionId: "1.0.1", IsLatest: false, Name: 'test',
|
|
309
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
310
|
+
v3 = AsposeHtml::FileVersion.new({VersionId: "2.0.1", IsLatest: false, Name: 'test',
|
|
311
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
312
|
+
v4 = AsposeHtml::FileVersion.new({VersionId: "3.0.1", IsLatest: true, Name: 'test',
|
|
313
|
+
IsFolder: false, ModifiedDate: time_now, Size: 100, Path: '/'})
|
|
314
|
+
|
|
315
|
+
@instance1 = AsposeHtml::FileVersionsResponse.new({Code: 200, Status: "OK", FileVersions: [v1, v2, v3] })
|
|
316
|
+
@instance2 = AsposeHtml::FileVersionsResponse.new({Code: 200, Status: "OK", FileVersions: [v1, v2, v3] })
|
|
317
|
+
@instance3 = AsposeHtml::FileVersionsResponse.new({Code: 200, Status: "OK", FileVersions: [v1, v2, v4] })
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
it 'should create an instance of FileVersionsResponse' do
|
|
321
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileVersionsResponse)
|
|
322
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileVersionsResponse)
|
|
323
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileVersionsResponse)
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
it 'check class names' do
|
|
328
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
329
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
330
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
331
|
+
|
|
332
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
333
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
334
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
335
|
+
|
|
336
|
+
expect(@instance1.file_versions).to be_instance_of(Array)
|
|
337
|
+
expect(@instance2.file_versions).to be_instance_of(Array)
|
|
338
|
+
expect(@instance3.file_versions).to be_instance_of(Array)
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
it 'check compare and keys' do
|
|
342
|
+
dictionary = @instance3.to_hash
|
|
343
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
344
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
345
|
+
expect(dictionary.has_key?(:FileVersions)).to be true
|
|
346
|
+
|
|
347
|
+
expect(@instance1).to eql(@instance2)
|
|
348
|
+
expect(@instance1).not_to eql(@instance3)
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
describe 'FileDetailsResponse' do
|
|
353
|
+
before(:all) do
|
|
354
|
+
# run before all test
|
|
355
|
+
time_now = DateTime.now.to_s
|
|
356
|
+
v1 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: false, ModifiedDate: time_now,
|
|
357
|
+
Size: 100, Path: '/'})
|
|
358
|
+
v2 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: false, ModifiedDate: time_now,
|
|
359
|
+
Size: 100, Path: '/'})
|
|
360
|
+
v3 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: false, ModifiedDate: time_now,
|
|
361
|
+
Size: 100, Path: '/'})
|
|
362
|
+
v4 = AsposeHtml::FileDetail.new({Name: 'test', IsFolder: true, ModifiedDate: time_now,
|
|
363
|
+
Size: 100, Path: '/'})
|
|
364
|
+
|
|
365
|
+
@instance1 = AsposeHtml::FileDetailsResponse.new({Code: 200, Status: "OK", Files: [v1, v2, v3] })
|
|
366
|
+
@instance2 = AsposeHtml::FileDetailsResponse.new({Code: 200, Status: "OK", Files: [v1, v2, v3] })
|
|
367
|
+
@instance3 = AsposeHtml::FileDetailsResponse.new({Code: 200, Status: "OK", Files: [v1, v2, v4] })
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
it 'should create an instance of FileVersionsResponse' do
|
|
371
|
+
expect(@instance1).to be_instance_of(AsposeHtml::FileDetailsResponse)
|
|
372
|
+
expect(@instance2).to be_instance_of(AsposeHtml::FileDetailsResponse)
|
|
373
|
+
expect(@instance3).to be_instance_of(AsposeHtml::FileDetailsResponse)
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
it 'check class names' do
|
|
378
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
379
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
380
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
381
|
+
|
|
382
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
383
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
384
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
385
|
+
|
|
386
|
+
expect(@instance1.file_details).to be_instance_of(Array)
|
|
387
|
+
expect(@instance2.file_details).to be_instance_of(Array)
|
|
388
|
+
expect(@instance3.file_details).to be_instance_of(Array)
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
it 'check compare and keys' do
|
|
392
|
+
dictionary = @instance3.to_hash
|
|
393
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
394
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
395
|
+
expect(dictionary.has_key?(:Files)).to be true
|
|
396
|
+
|
|
397
|
+
expect(@instance1).to eql(@instance2)
|
|
398
|
+
expect(@instance1).not_to eql(@instance3)
|
|
399
|
+
end
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
describe 'MoveFileResponse' do
|
|
403
|
+
before(:all) do
|
|
404
|
+
# run before all test
|
|
405
|
+
@instance1 = AsposeHtml::MoveFileResponse.new({Code: 200, Status: "OK"})
|
|
406
|
+
@instance2 = AsposeHtml::MoveFileResponse.new({Code: 200, Status: "OK"})
|
|
407
|
+
@instance3 = AsposeHtml::MoveFileResponse.new({Code: 403, Status: "Forbidden"})
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
it 'should create an instance of MoveFileResponse' do
|
|
411
|
+
expect(@instance1).to be_instance_of(AsposeHtml::MoveFileResponse)
|
|
412
|
+
expect(@instance2).to be_instance_of(AsposeHtml::MoveFileResponse)
|
|
413
|
+
expect(@instance3).to be_instance_of(AsposeHtml::MoveFileResponse)
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
it 'check class names' do
|
|
418
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
419
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
420
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
421
|
+
|
|
422
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
423
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
424
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
it 'check compare and keys' do
|
|
428
|
+
dictionary = @instance3.to_hash
|
|
429
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
430
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
431
|
+
|
|
432
|
+
expect(@instance1).to eql(@instance2)
|
|
433
|
+
expect(@instance1).not_to eql(@instance3)
|
|
434
|
+
end
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
describe 'MoveFolderResponse' do
|
|
438
|
+
before(:all) do
|
|
439
|
+
# run before all test
|
|
440
|
+
@instance1 = AsposeHtml::MoveFolderResponse.new({Code: 200, Status: "OK"})
|
|
441
|
+
@instance2 = AsposeHtml::MoveFolderResponse.new({Code: 200, Status: "OK"})
|
|
442
|
+
@instance3 = AsposeHtml::MoveFolderResponse.new({Code: 403, Status: "Forbidden"})
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
it 'should create an instance of MoveFolderResponse' do
|
|
446
|
+
expect(@instance1).to be_instance_of(AsposeHtml::MoveFolderResponse)
|
|
447
|
+
expect(@instance2).to be_instance_of(AsposeHtml::MoveFolderResponse)
|
|
448
|
+
expect(@instance3).to be_instance_of(AsposeHtml::MoveFolderResponse)
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
it 'check class names' do
|
|
453
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
454
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
455
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
456
|
+
|
|
457
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
458
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
459
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
460
|
+
end
|
|
461
|
+
|
|
462
|
+
it 'check compare and keys' do
|
|
463
|
+
dictionary = @instance3.to_hash
|
|
464
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
465
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
466
|
+
|
|
467
|
+
expect(@instance1).to eql(@instance2)
|
|
468
|
+
expect(@instance1).not_to eql(@instance3)
|
|
469
|
+
end
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
describe 'RemoveFileResponse' do
|
|
473
|
+
before(:all) do
|
|
474
|
+
# run before all test
|
|
475
|
+
@instance1 = AsposeHtml::RemoveFileResponse.new({Code: 200, Status: "OK"})
|
|
476
|
+
@instance2 = AsposeHtml::RemoveFileResponse.new({Code: 200, Status: "OK"})
|
|
477
|
+
@instance3 = AsposeHtml::RemoveFileResponse.new({Code: 403, Status: "Forbidden"})
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
it 'should create an instance of MoveFolderResponse' do
|
|
481
|
+
expect(@instance1).to be_instance_of(AsposeHtml::RemoveFileResponse)
|
|
482
|
+
expect(@instance2).to be_instance_of(AsposeHtml::RemoveFileResponse)
|
|
483
|
+
expect(@instance3).to be_instance_of(AsposeHtml::RemoveFileResponse)
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
it 'check class names' do
|
|
488
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
489
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
490
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
491
|
+
|
|
492
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
493
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
494
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
it 'check compare and keys' do
|
|
498
|
+
dictionary = @instance3.to_hash
|
|
499
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
500
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
501
|
+
|
|
502
|
+
expect(@instance1).to eql(@instance2)
|
|
503
|
+
expect(@instance1).not_to eql(@instance3)
|
|
504
|
+
end
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
describe 'RemoveFolderResponse' do
|
|
508
|
+
before(:all) do
|
|
509
|
+
# run before all test
|
|
510
|
+
@instance1 = AsposeHtml::RemoveFolderResponse.new({Code: 200, Status: "OK"})
|
|
511
|
+
@instance2 = AsposeHtml::RemoveFolderResponse.new({Code: 200, Status: "OK"})
|
|
512
|
+
@instance3 = AsposeHtml::RemoveFolderResponse.new({Code: 403, Status: "Forbidden"})
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
it 'should create an instance of RemoveFolderResponse' do
|
|
516
|
+
expect(@instance1).to be_instance_of(AsposeHtml::RemoveFolderResponse)
|
|
517
|
+
expect(@instance2).to be_instance_of(AsposeHtml::RemoveFolderResponse)
|
|
518
|
+
expect(@instance3).to be_instance_of(AsposeHtml::RemoveFolderResponse)
|
|
519
|
+
end
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
it 'check class names' do
|
|
523
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
524
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
525
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
526
|
+
|
|
527
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
528
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
529
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
530
|
+
end
|
|
531
|
+
|
|
532
|
+
it 'check compare and keys' do
|
|
533
|
+
dictionary = @instance3.to_hash
|
|
534
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
535
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
536
|
+
|
|
537
|
+
expect(@instance1).to eql(@instance2)
|
|
538
|
+
expect(@instance1).not_to eql(@instance3)
|
|
539
|
+
end
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
describe 'MessageResponse' do
|
|
543
|
+
before(:all) do
|
|
544
|
+
# run before all test
|
|
545
|
+
@instance1 = AsposeHtml::MessageResponse.new({Code: 200, Status: "OK"})
|
|
546
|
+
@instance2 = AsposeHtml::MessageResponse.new({Code: 200, Status: "OK"})
|
|
547
|
+
@instance3 = AsposeHtml::MessageResponse.new({Code: 403, Status: "Forbidden"})
|
|
548
|
+
end
|
|
549
|
+
|
|
550
|
+
it 'should create an instance of MessageResponse' do
|
|
551
|
+
expect(@instance1).to be_instance_of(AsposeHtml::MessageResponse)
|
|
552
|
+
expect(@instance2).to be_instance_of(AsposeHtml::MessageResponse)
|
|
553
|
+
expect(@instance3).to be_instance_of(AsposeHtml::MessageResponse)
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
it 'check class names' do
|
|
558
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
559
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
560
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
561
|
+
|
|
562
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
563
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
564
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
it 'check compare and keys' do
|
|
568
|
+
dictionary = @instance3.to_hash
|
|
569
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
570
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
571
|
+
|
|
572
|
+
expect(@instance1).to eql(@instance2)
|
|
573
|
+
expect(@instance1).not_to eql(@instance3)
|
|
574
|
+
end
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
describe 'StorageExistResponse' do
|
|
578
|
+
before(:all) do
|
|
579
|
+
f1 =
|
|
580
|
+
# run before all test
|
|
581
|
+
f1 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
582
|
+
f2 = AsposeHtml::FileExist.new({IsExist: false, IsFolder: false})
|
|
583
|
+
f3 = AsposeHtml::FileExist.new({IsExist: true, IsFolder: false})
|
|
584
|
+
|
|
585
|
+
@instance1 = AsposeHtml::StorageExistResponse.new({Code: 200, Status: "OK", IsExist: f1})
|
|
586
|
+
@instance2 = AsposeHtml::StorageExistResponse.new({Code: 200, Status: "OK", IsExist: f2})
|
|
587
|
+
@instance3 = AsposeHtml::StorageExistResponse.new({Code: 403, Status: "Forbidden", IsExist: f3})
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
it 'should create an instance of StorageExistResponse' do
|
|
591
|
+
expect(@instance1).to be_instance_of(AsposeHtml::StorageExistResponse)
|
|
592
|
+
expect(@instance2).to be_instance_of(AsposeHtml::StorageExistResponse)
|
|
593
|
+
expect(@instance3).to be_instance_of(AsposeHtml::StorageExistResponse)
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
it 'check class names' do
|
|
597
|
+
expect(@instance1.code).to be_instance_of(Integer)
|
|
598
|
+
expect(@instance2.code).to be_instance_of(Integer)
|
|
599
|
+
expect(@instance3.code).to be_instance_of(Integer)
|
|
600
|
+
|
|
601
|
+
expect(@instance1.status).to be_instance_of(String)
|
|
602
|
+
expect(@instance2.status).to be_instance_of(String)
|
|
603
|
+
expect(@instance3.status).to be_instance_of(String)
|
|
604
|
+
|
|
605
|
+
expect(@instance1.is_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
606
|
+
expect(@instance2.is_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
607
|
+
expect(@instance3.is_exist).to be_instance_of(AsposeHtml::FileExist)
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
it 'check compare and keys' do
|
|
613
|
+
dictionary = @instance3.to_hash
|
|
614
|
+
expect(dictionary.has_key?(:Code)).to be true
|
|
615
|
+
expect(dictionary.has_key?(:Status)).to be true
|
|
616
|
+
expect(dictionary.has_key?(:IsExist)).to be true
|
|
617
|
+
|
|
618
|
+
expect(@instance1).to eql(@instance2)
|
|
619
|
+
expect(@instance1).not_to eql(@instance3)
|
|
620
|
+
end
|
|
621
|
+
end
|
|
622
|
+
end
|