Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
0
        public void NonEmptyState(ClothingType clothing)
        {
            foreach (var item in ClothingSet.Street)
            {
                if (item == clothing)
                {
                    continue;
                }
                _state.PutOn(item);
                Assert.That(_state.IsOn(clothing), Is.False);
            }

            _state.PutOn(clothing);
            Assert.That(_state.IsOn(clothing));
        }
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));
            }
        }