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); }
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(); }