public void InvalidPatternReturnsFalse() { var sut = new IdPatternAttribute(); var actual = sut.IsValid("Diagnostic-example-dxa"); Assert.IsFalse(actual, "'Diagnostic-example-dxa' should not be valid, because it contains a capital letter."); }
public ReferenceValue(string value) { if (!Uri.IsWellFormedUriString(value, UriKind.Absolute) && !IdPatternAttribute.IsValidValue(value)) { throw Error.Argument("text", "Reference is not a valid Id nor a valid absolute Url"); } Value = value; }