require 'spec_helper' require 'json' # 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",$baseurl) end after do # run after each test end # unit tests for cells_task_post_run_task # Run tasks # # @param task_data # @param [Hash] opts the optional parameters # @return [Object] describe 'cells_task_post_run_task test' do it "should work" do # TaskData taskData = new TaskData(); # List tasks = new ArrayList(); # TaskDescription task1 = new TaskDescription(); # task1.setTaskType ("SplitWorkbook"); # # SplitWorkbookTaskParameter param1 = new SplitWorkbookTaskParameter(); # param1.setDestinationFileFormat ( "xlsx"); # # FileSource fs = new FileSource(); # fs.setFilePath( TEMPFOLDER); # fs.setFileSourceType ( "CloudFileSystem"); # param1.setDestinationFilePosition (fs); # param1.setSplitNameRule ( "sheetname"); # FileSource ds = new FileSource(); # ds.setFilePath( TEMPFOLDER + "\\" + BOOK1); # ds.setFileSourceType ( "CloudFileSystem"); # param1.setWorkbook (ds); # # task1.setTaskParameter ( param1); # tasks.add(task1); # taskData.setTasks(tasks); # taskData.getTasks().add(task1); param1 = AsposeCellsCloud::SplitWorkbookTaskParameter.new({:DestinationFileFormat=>'xlsx' ,:DestinationFilePosition=> AsposeCellsCloud::FileSource.new({:FileSourceType=>'CloudFileSystem'}),:SplitNameRule=>'sheetname',:Workbook=>AsposeCellsCloud::FileSource.new({:FilePath=>$TEMPFOLDER +'\\' + $BOOK1,:FileSourceType=>'CloudFileSystem'})}) task1 =AsposeCellsCloud::TaskDescription.new({:TaskType=>'SplitWorkbook',:TaskParameter=>param1}) task_data = AsposeCellsCloud::TaskData.new(:Tasks=>[task1]) result = @instance.cells_task_post_run_task(task_data) expect(result).not_to be_empty # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end