예제 #1
0
        public void TestSylConfig_2()
        {
            var sc = new SylConfig();

            Assert.IsNull(sc.ExcMots);
            var exc1 = new ExceptionMots("le");

            sc.ExcMots = exc1;
            Assert.AreEqual(exc1, sc.ExcMots);
            UndoFactory.UndoLastAction();
            Assert.IsNull(sc.ExcMots);
            UndoFactory.RedoLastCanceledAction();
            Assert.AreEqual(exc1, sc.ExcMots);
            sc.ResetExceptionMots();
            Assert.IsNull(sc.ExcMots);
            UndoFactory.UndoLastAction();
            Assert.AreEqual(exc1, sc.ExcMots);
            var exc2 = new ExceptionMots("le");

            sc.ExcMots = exc2;
            Assert.AreEqual(exc2, sc.ExcMots);
            UndoFactory.UndoLastAction();
            Assert.AreEqual(exc1, sc.ExcMots);
            UndoFactory.UndoLastAction();
            Assert.IsNull(sc.ExcMots);
        }