Esempio n. 1
0
        public void WorksheetSecondDefaultNameTest()
        {
            Color  testColor        = Color.OldLace;
            string expectedName     = "Sheet 2";
            int    expectedTabColor = testColor.ToArgb();

            Osrs.Oncor.Excel.XlColor      tabColor = new Osrs.Oncor.Excel.XlColor(expectedTabColor);
            Osrs.Oncor.Excel.XlWorksheets sheets   = new Osrs.Oncor.Excel.XlWorksheets();
            Osrs.Oncor.Excel.XlWorksheet  sheet1   = sheets.AddWorksheet(tabColor);
            Osrs.Oncor.Excel.XlWorksheet  sheet2   = sheets.AddWorksheet(tabColor);
            string actualName = sheet2.Name;

            Assert.AreEqual(expectedName, actualName);
        }
Esempio n. 2
0
 public void WorksheetsAddOneCountTest()
 {
     Osrs.Oncor.Excel.XlWorksheets sheets = new Osrs.Oncor.Excel.XlWorksheets();
     sheets.AddWorksheet("Sheet 1");
     Assert.AreEqual(sheets.Count, 1);
 }