Ejemplo n.º 1
0
        public void TestXClose()
        {
            SpreadsheetViewStub stub = new SpreadsheetViewStub();

            stub.spreadSheetPanel = new SpreadsheetPanel();
            Controller controller = new Controller(stub);

            stub.FireFileChosenEvent("../../testing1.ss");
            stub.Contents = "2";
            stub.FireContentsEvent();
            FormClosingEventArgs e;

            e = new FormClosingEventArgs(CloseReason.UserClosing, true);
            stub.FireXCloseEvent(e);
            Assert.AreEqual(true, e.Cancel);
        }