示例#1
0
        public void OnLoaded_WillThrow_WhenOnOrOffTextMissing()
        {
            var pillButton = new FakePillButtonCheckbox();

            pillButton.ForcedContent = "Off Text";
            pillButton.OnApplyTemplate();

            pillButton.FireLoadedEvent();
        }
示例#2
0
        public void OnApplyTemplate_WillAssignOnAndOffButtons_Always()
        {
            var pillButton = new FakePillButtonCheckbox();

            pillButton.OnApplyTemplate();

            Assert.IsTrue(pillButton.OnButton != null);
            Assert.IsTrue(pillButton.OffButton != null);
        }
示例#3
0
        public void OnLoaded_WillAssignOffButtonText_Always()
        {
            var pillButton = new FakePillButtonCheckbox();

            pillButton.ForcedContent = "On Text|Off Text";
            pillButton.OnApplyTemplate();

            pillButton.FireLoadedEvent();

            Assert.AreEqual("Off Text", pillButton.OffButton.Content as string);
        }