当前位置: 首页>>代码示例>>C#>>正文


C# SS.AbstractSpreadsheet类代码示例

本文整理汇总了C#中SS.AbstractSpreadsheet的典型用法代码示例。如果您正苦于以下问题:C# AbstractSpreadsheet类的具体用法?C# AbstractSpreadsheet怎么用?C# AbstractSpreadsheet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AbstractSpreadsheet类属于SS命名空间,在下文中一共展示了AbstractSpreadsheet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DivisionByZero1

 public void DivisionByZero1(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "4.1");
     Set(ss, "B1", "0.0");
     Set(ss, "C1", "= A1 / B1");
     Assert.IsInstanceOfType(ss.GetCellValue("C1"), typeof(FormulaError));
 }
开发者ID:jiiehe,项目名称:cs3500,代码行数:7,代码来源:GradingTests.cs

示例2: SetContentsWithFormulaReturnString

        public string SetContentsWithFormulaReturnString(AbstractSpreadsheet sheet, string name, Formula formula)
        {
            List<string> cell_names = new List<string>(sheet.SetCellContents(name, formula));
            string[] cell_array = cell_names.ToArray();
            string text = string.Join(",", cell_array);

            return text;
        }
开发者ID:Leyalic,项目名称:PS6_2015,代码行数:8,代码来源:SpreadsheetTests.cs

示例3: VV

        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion

        // Verifies cells and their values, which must alternate.
        public void VV(AbstractSpreadsheet sheet, params object[] constraints)
        {
            for (int i = 0; i < constraints.Length; i += 2)
            {
                if (constraints[i + 1] is double)
                {
                    Assert.AreEqual((double)constraints[i + 1], (double)sheet.GetCellValue((string)constraints[i]), 1e-9);
                }
                else
                {
                    Assert.AreEqual(constraints[i + 1], sheet.GetCellValue((string)constraints[i]));
                }
            }
        }
开发者ID:HeroOfCanton,项目名称:CS3500,代码行数:44,代码来源:UnitTest1.cs

示例4: OneFormula

 public void OneFormula(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "4.1");
     Set(ss, "B1", "5.2");
     Set(ss, "C1", "= A1+B1");
     VV(ss, "A1", 4.1, "B1", 5.2, "C1", 9.3);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:7,代码来源:MyUnitTests.cs

示例5: NumberFormula2

 public void NumberFormula2(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "= 4.6");
     VV(ss, "A1", 4.6);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:5,代码来源:MyUnitTests.cs

示例6: NumberFormula1

 public void NumberFormula1(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "4.1");
     Set(ss, "C1", "= A1 + 4.2");
     VV(ss, "C1", 8.3);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:6,代码来源:MyUnitTests.cs

示例7: MediumSheet

 public void MediumSheet(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "1.0");
     Set(ss, "A2", "2.0");
     Set(ss, "A3", "3.0");
     Set(ss, "A4", "4.0");
     Set(ss, "B1", "= A1 + A2");
     Set(ss, "B2", "= A3 * A4");
     Set(ss, "C1", "= B1 + B2");
     VV(ss, "A1", 1.0, "A2", 2.0, "A3", 3.0, "A4", 4.0, "B1", 3.0, "B2", 12.0, "C1", 15.0);
     Set(ss, "A1", "2.0");
     VV(ss, "A1", 2.0, "A2", 2.0, "A3", 3.0, "A4", 4.0, "B1", 4.0, "B2", 12.0, "C1", 16.0);
     Set(ss, "B1", "= A1 / A2");
     VV(ss, "A1", 2.0, "A2", 2.0, "A3", 3.0, "A4", 4.0, "B1", 1.0, "B2", 12.0, "C1", 13.0);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:15,代码来源:MyUnitTests.cs

示例8: Formulas

 public void Formulas(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "4.4");
     Set(ss, "B1", "2.2");
     Set(ss, "C1", "= A1 + B1");
     Set(ss, "D1", "= A1 - B1");
     Set(ss, "E1", "= A1 * B1");
     Set(ss, "F1", "= A1 / B1");
     VV(ss, "C1", 6.6, "D1", 2.2, "E1", 4.4 * 2.2, "F1", 2.0);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:10,代码来源:MyUnitTests.cs

示例9: Set

 // For setting a spreadsheet cell.
 public IEnumerable<string> Set(AbstractSpreadsheet sheet, string name, string contents)
 {
     List<string> result = new List<string>(sheet.SetContentsOfCell(name, contents));
     return result;
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:6,代码来源:MyUnitTests.cs

示例10: Formula1

 public void Formula1(AbstractSpreadsheet ss)
 {
     Set(ss, "a1", "= a2 + a3");
     Set(ss, "a2", "= b1 + b2");
     Assert.IsInstanceOfType(ss.GetCellValue("a1"), typeof(FormulaError));
     Assert.IsInstanceOfType(ss.GetCellValue("a2"), typeof(FormulaError));
     Set(ss, "a3", "5.0");
     Set(ss, "b1", "2.0");
     Set(ss, "b2", "3.0");
     VV(ss, "a1", 10.0, "a2", 5.0);
     Set(ss, "b2", "4.0");
     VV(ss, "a1", 11.0, "a2", 6.0);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:13,代码来源:MyUnitTests.cs

示例11: OneNumber

 public void OneNumber(AbstractSpreadsheet ss)
 {
     Set(ss, "C1", "17.5");
     VV(ss, "C1", 17.5);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:5,代码来源:MyUnitTests.cs

示例12: Formula2

 public void Formula2(AbstractSpreadsheet ss)
 {
     Set(ss, "a1", "= a2 + a3");
     Set(ss, "a2", "= a3");
     Set(ss, "a3", "6.0");
     VV(ss, "a1", 12.0, "a2", 6.0, "a3", 6.0);
     Set(ss, "a3", "5.0");
     VV(ss, "a1", 10.0, "a2", 5.0, "a3", 5.0);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:9,代码来源:MyUnitTests.cs

示例13: OneString

 public void OneString(AbstractSpreadsheet ss)
 {
     Set(ss, "B1", "hello");
     VV(ss, "B1", "hello");
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:5,代码来源:MyUnitTests.cs

示例14: Formula3

 public void Formula3(AbstractSpreadsheet ss)
 {
     Set(ss, "a1", "= a3 + a5");
     Set(ss, "a2", "= a5 + a4");
     Set(ss, "a3", "= a5");
     Set(ss, "a4", "= a5");
     Set(ss, "a5", "9.0");
     VV(ss, "a1", 18.0);
     VV(ss, "a2", 18.0);
     Set(ss, "a5", "8.0");
     VV(ss, "a1", 16.0);
     VV(ss, "a2", 16.0);
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:13,代码来源:MyUnitTests.cs

示例15: StringArgument

 public void StringArgument(AbstractSpreadsheet ss)
 {
     Set(ss, "A1", "4.1");
     Set(ss, "B1", "hello");
     Set(ss, "C1", "= A1 + B1");
     Assert.IsInstanceOfType(ss.GetCellValue("C1"), typeof(FormulaError));
 }
开发者ID:unaveed,项目名称:Spreadsheet,代码行数:7,代码来源:MyUnitTests.cs


注:本文中的SS.AbstractSpreadsheet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。