Exemplo n.º 1
0
        protected override void AssertColour(String hexExpected, IColor actual)
        {
            Assert.IsNotNull(actual, "Colour must be given");

            if (actual is HSSFColor)
            {
                HSSFColor colour = (HSSFColor)actual;
                Assert.AreEqual(hexExpected, colour.GetHexString());
            }
            else
            {
                HSSFExtendedColor colour = (HSSFExtendedColor)actual;
                if (hexExpected.Length == 8)
                {
                    Assert.AreEqual(hexExpected, colour.ARGBHex);
                }
                else
                {
                    Assert.AreEqual(hexExpected, colour.ARGBHex.Substring(2));
                }
            }
        }
Exemplo n.º 2
0
 public void Compare(HSSFColor expected, HSSFColor palette)
 {
     Assert.AreEqual(expected.GetHexString(), palette.GetHexString());
 }