Esempio n. 1
0
        public void ImplicitOperatorExtendedColors()
        {
            Color          c  = Color.FromArgb(unchecked ((int)0xFFA1A187));
            ExtendedColors ec = ExtendedColors.FromArgb(c.ToArgb());

            Assert.AreEqual(unchecked ((int)0xFFA1A187), ec.ToArgb());
        }
Esempio n. 2
0
        public void IsKnownColorTest()
        {
            ExtendedColors ec = ExtendedColors.FromName("MareaBaja");

            Assert.AreEqual(true, ec.IsKnownColor);

            ExtendedColors ec2 = ExtendedColors.FromArgb(unchecked ((int)0xFF795482));

            Assert.AreEqual(false, ec2.IsKnownColor);
        }
Esempio n. 3
0
        public void IsNamedColorTest()
        {
            ExtendedColors ec = ExtendedColors.FromName("VodoYellow");

            Assert.AreEqual(true, ec.IsNamedColor);

            ExtendedColors ec2 = ExtendedColors.FromArgb(unchecked ((int)0xFF795482));

            Assert.AreEqual(false, ec2.IsNamedColor);
        }
Esempio n. 4
0
        public void IsEmptyTest()
        {
            ExtendedColors ec = new ExtendedColors();

            Assert.AreEqual(true, ec.IsEmpty);

            ExtendedColors ec2 = ExtendedColors.FromArgb(unchecked ((int)0xFF795484));

            Assert.AreEqual(false, ec2.IsEmpty);
        }
Esempio n. 5
0
        public void FromArgbDTest()
        {
            ExtendedColors ec = ExtendedColors.FromArgb(90, ExtendedColors.MareaBaja);

            Assert.AreEqual(unchecked ((int)0x5A2E5464), ec.ToArgb());
        }
Esempio n. 6
0
        public void FromArgbCTest()
        {
            ExtendedColors ec = ExtendedColors.FromArgb(255, 46, 84, 100);

            Assert.AreEqual(unchecked ((int)0xFF2E5464), ec.ToArgb());
        }