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

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

            Assert.AreNotSame(text, result);
        }
예제 #3
0
 public static void Hex_GivenNullEmptyOrWhiteSpace_ThrowsArgNullException()
 {
     Assert.Multiple(() =>
     {
         Assert.Throws <ArgumentNullException>(() => Fabulous.Hex(null));
         Assert.Throws <ArgumentNullException>(() => Fabulous.Hex(string.Empty));
         Assert.Throws <ArgumentNullException>(() => Fabulous.Hex("   "));
     });
 }