Example #1
0
        protected override void CreateActions()
        {
            AddLoadModuleActions(typeof(CharacterFormatting));
            CharacterFormatting dayViewModule = (CharacterFormatting)DemoBaseTesting.CurrentDemoModule;
            RichEditViewType    viewType      = DispatchExpr(() => dayViewModule.richEdit.ActiveViewType);

            Assert.AreEqual(RichEditViewType.PrintLayout, viewType);
        }
        public void TestTriStateBooleanProperty_ApplyThroughCharacterFormatting()
        {
            CharacterFormatting cf1 = new CharacterFormatting(true);
            cf1.Properties = new CharacterProperties();
            Assert.IsTrue(cf1.Properties.Bold.IsDefault());
            Assert.IsFalse(cf1.Properties.Bold);

            CharacterFormatting cf2 = new CharacterFormatting(true);
            cf2.Properties = new CharacterProperties();
            cf2.Properties.Bold = true;

            cf1.Properties.Apply(cf2.Properties);
            Assert.IsFalse(cf1.Properties.Bold.IsDefault());
            Assert.IsTrue(cf1.Properties.Bold);
        }