Exemplo n.º 1
0
        public void testOFail()
        {
            SpreadsheetViewStub stub    = new SpreadsheetViewStub();
            Controller          control = new Controller(stub);

            stub.FireOpenEvent("testfail.ss");
            stub.Title.ToString();
        }
Exemplo n.º 2
0
        public void TestMethod12()
        {
            SpreadsheetViewStub stub    = new SpreadsheetViewStub();
            Controller          control = new Controller(stub);

            SpreadsheetViewStub stub1 = new SpreadsheetViewStub();
            String      fileName      = "test.ss";
            Spreadsheet ss            = new Spreadsheet();
            Controller  contro1l      = new Controller(stub1, ss, fileName);

            stub.SetNewSelection(0, 0);
            stub.FireContentEvent("=2");
            stub.FireSaveEvent("test.ss");
            Assert.AreEqual(stub.Title.ToString(), "test.ss");

            stub1.FireOpenEvent(fileName);
            Assert.AreEqual(stub1.Title.ToString(), "test.ss");
        }