Esempio n. 1
0
        public void Satisfied_On_AnySuperset(ClothingType clothing)
        {
            var rule = new OnRule(clothing);

            _state.PutOn(clothing);
            Assert.That(rule.IsSatisfied(_state));

            foreach (var item in ClothingSet.Street)
            {
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state));
            }
        }
Esempio n. 2
0
        public void Fails_On_AnyNonMatchingSubset(ClothingType clothing)
        {
            var rule = new OnRule(clothing);

            foreach (var item in ClothingSet.Street)
            {
                if (item == clothing)
                {
                    continue;
                }
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state), Is.False);
            }
        }
Esempio n. 3
0
        public void Fails_On_EmptySet(ClothingType clothing)
        {
            var rule = new OnRule(clothing);

            Assert.That(rule.IsSatisfied(_state), Is.False);
        }