=begin #Web API Swagger specification #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.0-SNAPSHOT =end require 'spec_helper' require 'json' require 'base64' # Unit tests for AsposeCellsCloud::CellsTaskApi # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen) # Please update as you see appropriate describe 'CellsTaskApi' do before do @instance = AsposeCellsCloud::CellsApi.new($client_id,$client_secret,"v3.0") end after do # run after each test end # unit tests for cells_copy # Run tasks # # @param task_data # @param [Hash] opts the optional parameters # @return [Object] describe 'cells_storage_op test' do it "should work" do name ="ReportData.xml" folder = $TEMPFOLDER # stream = File.read("/home/roywang/asposecellscloudsdk/data/" << name) # @instance.object_exists(name) # @instance.storage_exists("Default App"); # filename = folder +"/" + name # aFile = File.new("/home/roywang/asposecellscloudsdk/data/" +name , 'rb') # stream = aFile.sysread(aFile.size) # aFile.close # binary_file = File.open("/home/roywang/asposecellscloudsdk/data/" +name, "rb") # data = [ # [ "import[sync]","false" ], # [ "import[name]", stream, { filename: "Book1.xlsx"} ] # ] # stream = File.open("/home/roywang/asposecellscloudsdk/data/" +name,"r") {|io| io.read(io.size) } @instance.upload_file( "Temp/ReportData.xml", ::File.open("data/" +name,"r") {|io| io.read(io.size) }) # @instance.copy_file(name , folder +"/1"+ name) # @instance.copy_folder(folder, folder + "2"); # @instance.move_folder(folder+ "2", folder + "3"); # @instance.delete_folder("Temp3"); # @instance.create_folder("Temp1"); # @instance.delete_folder(folder + "1"); # @instance.download_file( folder +"/"+ name) # @instance.delete_file("Temp/book1updata.xlsx") # @instance.get_files_list(folder ); # @instance.move_file(folder + "\\1" + name, folder + "\\2" + name); # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end