Ejemplo n.º 1
0
        public void Fails_On_AnyMatchingSubset(ClothingType clothing)
        {
            var rule = new OffRule(clothing);

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

            foreach (var item in ClothingSet.All)
            {
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state), Is.False);
            }
        }
Ejemplo n.º 2
0
        public void OK_On_EmptySet(ClothingType clothing)
        {
            Assume.That(clothing, Is.Not.EqualTo(ClothingType.Pajamas));

            var rule = new OffRule(clothing);

            Assert.That(rule.IsSatisfied(_state));
        }
Ejemplo n.º 3
0
        public void OK_On_AnyNonMatchingSubset(ClothingType clothing)
        {
            Assume.That(clothing, Is.Not.EqualTo(ClothingType.Pajamas));

            var rule = new OffRule(clothing);

            foreach (var item in ClothingSet.All)
            {
                if (item == clothing || item == ClothingType.Pajamas)
                {
                    continue;
                }
                _state.PutOn(item);
                Assert.That(rule.IsSatisfied(_state));
            }
        }