コード例 #1
0
        public void Valid_Should_Pass()
        {
            var address = new Address("20", "Queen St.", "Auckland", "Auckland", "New Zealand", "0926");
            var valid   = new Venue("Farmers", address);

            var rule = new VenueValidator();

            rule.TestValidate(valid).ShouldNotHaveAnyValidationErrors();
        }
コード例 #2
0
        public void Validator_Should_Have_AddressValidator()
        {
            var rule = new VenueValidator();

            rule.ShouldHaveChildValidator(p => p.Address, typeof(AddressValidator));
        }