public void CellsAutoFilterPutWorksheetColorFilterTest() { // TODO uncomment below to test the method and replace null with proper value string name = BOOK1; string sheetName = SHEET1; string range = RANGE; int? fieldIndex = 0; ColorFilterRequest colorFilter = new ColorFilterRequest(); Color color = new Color();//0, 255, 245, 2 color.R = 255; color.G = 245; colorFilter.ForegroundColor = new CellsColor(); colorFilter.ForegroundColor.Color = color; colorFilter.Pattern = "Solid"; bool? matchBlanks = true; bool? refresh = true; string folder = TEMPFOLDER; UpdateDataFile(TEMPFOLDER, BOOK1); var response = instance.CellsAutoFilterPutWorksheetColorFilter(name, sheetName, range, fieldIndex, colorFilter, matchBlanks, refresh, folder); Assert.IsInstanceOf <SaaSposeResponse>(response, "response is SaaSposeResponse"); Assert.AreEqual(response.Code, 200); }
public void CellsAutoFilterPutWorksheetColorFilterExample() { string name = "Book1.xlsx"; string sheetName = "SHEET1"; string range = "a1:a10"; int? fieldIndex = 0; ColorFilterRequest colorFilter = new ColorFilterRequest(); Color color = new Color();//0, 255, 245, 2 color.R = 255; color.G = 245; colorFilter.ForegroundColor = new CellsColor(); colorFilter.ForegroundColor.Color = color; colorFilter.Pattern = "Solid"; bool? matchBlanks = true; bool? refresh = true; string folder = null; new Config().UpdateDataFile(null, "Book1.xlsx"); var response = instance.CellsAutoFilterPutWorksheetColorFilter(name, sheetName, range, fieldIndex, colorFilter, matchBlanks, refresh, folder); Console.WriteLine(response); }