public void TestConvertColorInvalid(string colorString) { var exception = Assert.Throws <ArgumentException>(() => RTConverters.ConvertColor(colorString)); Assert.True(exception.Message.Contains("Cannot parse ")); Assert.True(exception.Message.Contains(" is not a hexadecimal string")); }
public void TestConvertColorValid( byte r, byte?g, byte?b, string colorString) { var expectedRGBColour = new RGBColorOption(r, g, b); var actualRGBColor = RTConverters.ConvertColor(colorString); Assert.AreEqual(expectedRGBColour, actualRGBColor); }