public void CellsWorksheetsPutProtectWorksheetTest() { string name = "Book1.xlsx"; string sheetName = "SHEET1"; ProtectSheetParameter protectParameter = new ProtectSheetParameter(); protectParameter.ProtectionType = "All"; protectParameter.Password = "******"; string folder = null; new Config().UpdateDataFile(folder, name); var response = instance.CellsWorksheetsPutProtectWorksheet(name, sheetName, protectParameter, folder); Console.WriteLine(response); }
public void CellsWorksheetsPutProtectWorksheetTest() { // TODO uncomment below to test the method and replace null with proper value string name = BOOK1; string sheetName = SHEET1; ProtectSheetParameter protectParameter = new ProtectSheetParameter(); protectParameter.ProtectionType = "All"; protectParameter.Password = "******"; string folder = TEMPFOLDER; UpdateDataFile(instance, folder, name); var response = instance.CellsWorksheetsPutProtectWorksheet(name, sheetName, protectParameter, folder); Assert.IsInstanceOf <WorksheetResponse>(response, "response is WorksheetResponse"); Assert.AreEqual(response.Code, 200); }