public static void BgHex_GivenValidHex_ReturnsObjectWithBackgroundSet() { var expectedColor = new Rgb(143, 188, 143); var result = Fabulous.BgHex("#8FBC8F"); Assert.AreEqual(expectedColor, result.BackgroundColor); }
public static void BgHex_GivenValidHex_ReturnsNewObject() { FabulousText text = string.Empty; var result = Fabulous.BgHex("#8FBC8F"); Assert.AreNotSame(text, result); }
public static void BgHex_GivenNullEmptyOrWhiteSpace_ThrowsArgNullException() { Assert.Multiple(() => { Assert.Throws <ArgumentNullException>(() => Fabulous.BgHex(null)); Assert.Throws <ArgumentNullException>(() => Fabulous.BgHex(string.Empty)); Assert.Throws <ArgumentNullException>(() => Fabulous.BgHex(" ")); }); }