Пример #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);
        }