Example #1
0
 public void IsValidHexColour()
 {
     OpAttributeSanitizer.IsValidHexColor("#234").Should().BeTrue();
     OpAttributeSanitizer.IsValidHexColor("#f23").Should().BeTrue();
     OpAttributeSanitizer.IsValidHexColor("#fFe234").Should().BeTrue();
     OpAttributeSanitizer.IsValidHexColor("#g34").Should().BeFalse();
     OpAttributeSanitizer.IsValidHexColor("e34").Should().BeFalse();
     OpAttributeSanitizer.IsValidHexColor("123434").Should().BeFalse();
 }
Example #2
0
 public void IsValidFontName()
 {
     OpAttributeSanitizer.IsValidFontName("gooD-ol times 2").Should().BeTrue();
     OpAttributeSanitizer.IsValidHexColor("bad\"times?").Should().BeFalse();
 }