Example #1
0
        public void Should_check_when_should_execute(string propertyName, string propertyValue, bool shouldExecute)
        {
            var property = new KeyValuePair <string, JToken>(propertyName, propertyValue);

            var processor = new GuidProcessor();

            processor.ShouldExecute(property).Should().Be(shouldExecute);
        }
Example #2
0
        public void Should_read_request_value(string propertyName, string valueProperty, string pattern)
        {
            var result    = new JObject();
            var processor = new GuidProcessor();

            processor.Execute(result, new KeyValuePair <string, JToken>(propertyName, valueProperty));

            result.Should().ContainKey(propertyName);
            Regex.IsMatch(result[propertyName].ToString(), pattern, RegexOptions.IgnoreCase)
            .Should()
            .BeTrue();
        }