Esempio n. 1
0
        public void NotFound()
        {
            DefaultValidationDispatcher dispatcher = new DefaultValidationDispatcher();

            dispatcher.AddSearchHandler(TryGetValidationHandler);

            dispatcher.Validate(55);
        }
Esempio n. 2
0
        public void Found()
        {
            DefaultValidationDispatcher dispatcher = new DefaultValidationDispatcher();

            dispatcher.AddSearchHandler(TryGetValidationHandler);

            Assert.AreEqual(true, dispatcher.Validate("Hello, World!").IsValid);
            Assert.AreEqual(false, dispatcher.Validate("Xyz").IsValid);
        }