public void AllItemsBecomeInvalid_RevalidatesAllItems() { Results.EnabledValidators = ValidatorTypes.Property; Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemA, x => x.ItemProperty) .On(OwnerOfAB, CollectionAValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemAB, x => x.ItemProperty) .On(OwnerOfAB, CollectionAValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemAB, x => x.ItemProperty) .On(OwnerOfAB, CollectionBValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemABC, x => x.ItemProperty) .On(OwnerOfAB, CollectionAValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemABC, x => x.ItemProperty) .On(OwnerOfAB, CollectionBValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemABC, x => x.ItemProperty) .On(OwnerOfC, CollectionCValidatorKey); Results.SetupFailing().CollectionPropertyValidation .Targeting(ItemC, x => x.ItemProperty) .On(OwnerOfC, CollectionCValidatorKey); ItemAB.Revalidate(x => x.ItemProperty);; Results.VerifySetupValidationResults(); }
public void ItemIsValid_NoErrorIsAdded() { ItemAB.Revalidate(x => x.ItemProperty);; ValidationAssert.IsValid(ItemAB); }