public void ValidationPassesForValidPostCodes()
        {
            PostCodeValidator validator = new PostCodeValidator("GB");

            Assert.IsTrue(validator.IsValid(this, "DY13 9SB"));
            Assert.IsTrue(validator.IsValid(this, "S11 7EZ"));
            Assert.IsTrue(validator.IsValid(this, "SW12 0HF"));            
        }
        public void ValidationFailsForInvalidPostCodes()
        {
            PostCodeValidator validator = new PostCodeValidator("GB");

            Assert.IsFalse(validator.IsValid(this, "A 1"));
            Assert.IsFalse(validator.IsValid(this, "AB 1A"));
            Assert.IsFalse(validator.IsValid(this, "1AB 2AB"));
        }
 public void ExceptionThrownForCulturesWithoutASpecifiedExpression()
 {
     PostCodeValidator validator = new PostCodeValidator("NI");
     validator.IsValid(this, "abc");
 }