Esempio n. 1
0
        public void ValidateRegexTest()
        {
            IMethod m = new MockMethod();
            var dict = new JsonDictionary { { "name", "test" }, { "pattern", ".+" } };

            var p = ServiceFactory.Default.CreateParameter("test", dict);
            var inputData = new ParameterCollection();
            var validator = new MethodValidator(m, inputData);
            Assert.IsTrue(validator.ValidateRegex(p, "Test"));
        }
Esempio n. 2
0
        public void ValidateRegexTest()
        {
            IMethod m = new MockMethod();
            var dict = new JsonDictionary { { "name", "test" }, { "pattern", ".+" } };

            var jsonObj = new KeyValuePair<string, object>("test", dict);

            var p = new ParameterFactory.BaseParameter(jsonObj);
            var inputData = new ParameterCollection();
            var validator = new MethodValidator(m, inputData);
            Assert.IsTrue(validator.ValidateRegex(p, "Test"));
        }
        public void ValidateRegexTest()
        {
            IMethod m    = new MockMethod();
            var     dict = new JsonDictionary {
                { "name", "test" }, { "pattern", ".+" }
            };

            var p         = ServiceFactory.Default.CreateParameter("test", dict);
            var inputData = new ParameterCollection();
            var validator = new MethodValidator(m, inputData);

            Assert.IsTrue(validator.ValidateRegex(p, "Test"));
        }
        public void ValidateRegexTest()
        {
            IMethod m    = new MockMethod();
            var     dict = new JsonDictionary {
                { "name", "test" }, { "pattern", ".+" }
            };

            var jsonObj = new KeyValuePair <string, object>("test", dict);


            var p         = new ParameterFactory.BaseParameter(jsonObj);
            var inputData = new ParameterCollection();
            var validator = new MethodValidator(m, inputData);

            Assert.IsTrue(validator.ValidateRegex(p, "Test"));
        }