Пример #1
0
        public void VerifyOneItemSelectedComplies()
        {
            var button = new Button();
            var peer   = new SelectionPeer(button, 1)
            {
                IsSelectionRequired = true
            };
            var rule = new RequiredSelectionRule();

            Assert.IsTrue(rule.IsValid(button, peer));
        }
Пример #2
0
        public void VerifyNoItemSelectedFails()
        {
            var button = new Button();
            var peer   = new SelectionPeer(button, 0)
            {
                IsSelectionRequired = true
            };
            var rule = new RequiredSelectionRule();

            Assert.IsFalse(rule.IsValid(button, peer));
        }