Ejemplo n.º 1
0
        public void testAcceptanceTest1()
        {
            setUp();
            TableModel model;
            SheetFrame frame;

            model = new TableModel(new Sheet());
            frame = new SheetFrame(model);

            frame.select(0, 1);   // A1
            frame.Editor = "8";
            frame.saveToCell();

            frame.select(1, 1);   // A2
            frame.Editor = "=A1*A1+A1";
            frame.saveToCell();

            Assert.AreEqual("72", frame.Table.getValueAt(1, 1));

            frame.select(0, 1);   // A1
            frame.Editor = "5";
            frame.saveToCell();

            Assert.AreEqual("30", frame.Table.getValueAt(1, 1));
        }
Ejemplo n.º 2
0
        public void testThatEditedValueGetsSaved()
        {
            setUp();
            model.setValueAt("=7", 1, 1);
            frame.select(1, 1);

            frame.Editor = "=8";
            frame.saveToCell();
            Assert.AreEqual("=8", frame.Table.getLiteralValueAt(1, 1));
            Assert.AreEqual("8", frame.Table.getValueAt(1, 1));
        }