99 */
1010
1111using System ;
12- using System . IO ;
1312using System . Collections . Generic ;
14- using System . Collections . ObjectModel ;
15- using System . Linq ;
16- using System . Reflection ;
17- using RestSharp ;
1813using NUnit . Framework ;
19-
20- using Aspose . Cells . Cloud . SDK . Client ;
2114using Aspose . Cells . Cloud . SDK . Api ;
2215using Aspose . Cells . Cloud . SDK . Model ;
2316
@@ -407,7 +400,7 @@ public void CellsWorkbookPostWorkbookSplitTest()
407400 int ? verticalResolution = 90 ;
408401 string folder = TEMPFOLDER ;
409402 UpdateDataFile ( instance , folder , name ) ;
410- var response = instance . CellsWorkbookPostWorkbookSplit ( name , format , from , to , horizontalResolution , verticalResolution , folder ) ;
403+ var response = instance . CellsWorkbookPostWorkbookSplit ( name , format , from , to , horizontalResolution , verticalResolution , folder ) ;
411404 Assert . IsInstanceOf < SplitResultResponse > ( response , "response is SplitResultResponse" ) ;
412405 Assert . AreEqual ( response . Code , 200 ) ;
413406 }
@@ -474,7 +467,7 @@ public void CellsWorkbookPutConvertWorkBookTest()
474467 string password = null ;
475468 string outPath = null ;
476469 UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
477- var response = instance . CellsWorkbookPutConvertWorkbook ( GetTestDataByteArray ( workbook ) , format , password , outPath ) ;
470+ var response = instance . CellsWorkbookPutConvertWorkbook ( GetTestDataStream ( workbook ) , format , password , outPath ) ;
478471 Assert . IsInstanceOf < System . IO . Stream > ( response , "response is System.IO.Stream" ) ;
479472 //WriteResponseStream(workbook + "." + format, response);
480473 }
@@ -491,7 +484,7 @@ public void CellsWorkbookPutConvertMDTest()
491484 string password = null ;
492485 string outPath = null ;
493486 UpdateDataFile ( instance , TEMPFOLDER , BOOK1 ) ;
494- var response = instance . CellsWorkbookPutConvertWorkbook ( GetTestDataByteArray ( workbook ) , format , password , outPath ) ;
487+ var response = instance . CellsWorkbookPutConvertWorkbook ( GetTestDataStream ( workbook ) , format , password , outPath ) ;
495488 Assert . IsInstanceOf < System . IO . Stream > ( response , "response is System.IO.Stream" ) ;
496489 //WriteResponseStream(workbook + "." + format, response);
497490 }
@@ -527,13 +520,13 @@ public void CellsWorkbookPutWorkbookCreateTest()
527520 string folder = TEMPFOLDER ;
528521 UpdateDataFile ( instance , folder , templateFile ) ;
529522 UpdateDataFile ( instance , folder , dataFile ) ;
530- var response = instance . CellsWorkbookPutWorkbookCreate ( name , folder + "/" + templateFile , folder + "/" + dataFile , folder ) ;
523+ var response = instance . CellsWorkbookPutWorkbookCreate ( name , folder + "/" + templateFile , folder + "/" + dataFile , false , folder ) ;
531524 Assert . IsInstanceOf < WorkbookResponse > ( response , "response is WorkbookResponse" ) ;
532525 Assert . AreEqual ( response . Code , 200 ) ;
533526
534527 }
535528
536- [ Test ]
529+ [ Ignore ( "Ignore DropBox" ) ]
537530 public void CellsWorkbookPostWorkbooksTextSearchTestForDropBox ( )
538531 {
539532 string name = BOOK1 ;
@@ -545,6 +538,55 @@ public void CellsWorkbookPostWorkbooksTextSearchTestForDropBox()
545538 Assert . AreEqual ( response . Code , 200 ) ;
546539 }
547540
541+ /// <summary>
542+ /// Test CellsWorkbookPutBackgroupTest
543+ /// </summary>
544+ [ Test ]
545+ public void CellsWorkbookPutBackgroupTest ( )
546+ {
547+ // TODO uncomment below to test the method and replace null with proper value
548+ string name = BOOK1 ;
549+ string folder = TEMPFOLDER ;
550+ UpdateDataFile ( instance , folder , name ) ;
551+ var response = instance . CellsWorkbookPutWorkbookBackground ( name , GetTestDataByteArray ( "WaterMark.png" ) , folder ) ;
552+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is WorkbookResponse" ) ;
553+ Assert . AreEqual ( response . Code , 200 ) ;
554+
555+ }
556+
557+ /// <summary>
558+ /// Test CellsWorkbookPutBackgroupTest
559+ /// </summary>
560+ [ Test ]
561+ public void CellsWorkbookDeleteBackgroupTest ( )
562+ {
563+ // TODO uncomment below to test the method and replace null with proper value
564+ string name = BOOK1 ;
565+ string folder = TEMPFOLDER ;
566+ UpdateDataFile ( instance , folder , name ) ;
567+ var response = instance . CellsWorkbookDeleteWorkbookBackground ( name , folder ) ;
568+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is WorkbookResponse" ) ;
569+ Assert . AreEqual ( response . Code , 200 ) ;
570+ }
571+
572+ /// <summary>
573+ /// Test CellsWorkbookPutWorkbookCreate
574+ /// </summary>
575+ [ Test ]
576+ public void CellsWorkbookPutWorkbookCreateNewTest ( )
577+ {
578+ // TODO uncomment below to test the method and replace null with proper value
579+ string name = "NewBook" + DateTime . Now . ToString ( "yymmddhhmiss" ) + ".xlsx" ;
580+ string templateFile = BOOK1 ;
581+ string dataFile = "ReportData.xml" ;
582+ string folder = TEMPFOLDER ;
583+ UpdateDataFile ( instance , folder , templateFile ) ;
584+ UpdateDataFile ( instance , folder , dataFile ) ;
585+ var response = instance . CellsWorkbookPutWorkbookCreate ( name , folder + "/" + templateFile , folder + "/" + dataFile , false , folder ) ;
586+ Assert . IsInstanceOf < CellsCloudResponse > ( response , "response is WorkbookResponse" ) ;
587+ Assert . AreEqual ( response . Code , 200 ) ;
588+
589+ }
548590 }
549591
550592}
0 commit comments