public void ReferenceRule01PassesValidReferences() { var model = new SupplementaryDataModel { Reference = @"Aa0 .,;:~!”@#$&’()/+-<=>[]{}^£€" }; var rule = new ReferenceRule01(_messageServiceMock.Object); Assert.True(rule.IsValid(model)); }
public void ReferenceRule01CatchesRegexViolations() { var invalidCharacters = "|~?"; var model = new SupplementaryDataModel { Reference = invalidCharacters }; var rule = new ReferenceRule01(_messageServiceMock.Object); Assert.False(rule.IsValid(model)); }