public void CanPassSubCriteriaToAny() { var subCriteria1 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria1.Expect(x => x.Name, Is.Set); var subCriteria2 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria2.Expect(x => x.Type, Is.Set); acceptance.Any(subCriteria1, subCriteria2); acceptance .Matches(new PropertyInspector(new PropertyMapping { Name = "Property1"})) .ShouldBeTrue(); }
public void CanPassSubCriteriaToEither() { var subCriteria1 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria1.Expect(x => x.Name, Is.Set); var subCriteria2 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria2.Expect(x => x.Type, Is.Set); acceptance.Either(subCriteria1, subCriteria2); var propertyMapping = new PropertyMapping(); propertyMapping.Set(x => x.Name, Layer.Defaults, "Property1"); acceptance .Matches(new PropertyInspector(propertyMapping)) .ShouldBeTrue(); }
public void CanPassSubCriteriaToAny() { var subCriteria1 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria1.Expect(x => x.Name, Is.Set); var subCriteria2 = new ConcreteAcceptanceCriteria<IPropertyInspector>(); subCriteria2.Expect(x => x.Type, Is.Set); acceptance.Any(subCriteria1, subCriteria2); var propertyMapping = new PropertyMapping(); propertyMapping.Set(x => x.Name, Layer.Defaults, "Property1"); acceptance .Matches(new PropertyInspector(propertyMapping)) .ShouldBeTrue(); }
public void CanPassSubCriteriaToAny() { var subCriteria1 = new ConcreteAcceptanceCriteria <IPropertyInspector>(); subCriteria1.Expect(x => x.Name, Is.Set); var subCriteria2 = new ConcreteAcceptanceCriteria <IPropertyInspector>(); subCriteria2.Expect(x => x.Type, Is.Set); acceptance.Any(subCriteria1, subCriteria2); acceptance .Matches(new PropertyInspector(new PropertyMapping { Name = "Property1" })) .ShouldBeTrue(); }