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); } }
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)); }
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)); } }