Beispiel #1
0
        public void TestBlankCellChangedToValueCell()
        {
            TestCases.CultureShim.SetCurrentCulture("en-US");

            MySheet ms = new MySheet();

            ms.SetCellFormula("A1", "B1+2.2");
            ms.SetCellValue("B1", 1.5);
            ms.ClearAllCachedResultValues();
            ms.ClearCell("B1");
            ms.GetAndClearLog();

            ConfirmEvaluate(ms, "A1", 2.2);
            ConfirmLog(ms, new String[] {
                "start A1 B1+2.2",
                "end A1 2.2",
            });
            ms.SetCellValue("B1", 0.4);
            ConfirmLog(ms, new String[] {
                "changeFromBlank B1 0.4",
                "clear A1",
            });

            ConfirmEvaluate(ms, "A1", 2.6);
            ConfirmLog(ms, new String[] {
                "start A1 B1+2.2",
                "hit B1 0.4",
                "end A1 2.6",
            });
        }
Beispiel #2
0
        public void TestBlankCellChangedToValueCell()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");

            MySheet ms = new MySheet();

            ms.SetCellFormula("A1", "B1+2.2");
            ms.SetCellValue("B1", 1.5);
            ms.ClearAllCachedResultValues();
            ms.ClearCell("B1");
            ms.GetAndClearLog();

            ConfirmEvaluate(ms, "A1", 2.2);
            ConfirmLog(ms, new String[] {
                "start A1 B1+2.2",
                "end A1 2.2",
            });
            ms.SetCellValue("B1", 0.4);
            ConfirmLog(ms, new String[] {
                "changeFromBlank B1 0.4",
                "clear A1",
            });

            ConfirmEvaluate(ms, "A1", 2.6);
            ConfirmLog(ms, new String[] {
                "start A1 B1+2.2",
                "hit B1 0.4",
                "end A1 2.6",
            });
        }