예제 #1
0
        public static void BgHex_GivenValidHex_ReturnsObjectWithBackgroundSet()
        {
            var expectedColor = new Rgb(143, 188, 143);
            var result        = Fabulous.BgHex("#8FBC8F");

            Assert.AreEqual(expectedColor, result.BackgroundColor);
        }
예제 #2
0
        public static void BgHex_GivenValidHex_ReturnsNewObject()
        {
            FabulousText text   = string.Empty;
            var          result = Fabulous.BgHex("#8FBC8F");

            Assert.AreNotSame(text, result);
        }
예제 #3
0
 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("   "));
     });
 }