示例#1
0
        public static bool AreLabelStylesEqual(LabelStyle lhs, LabelStyle rhs)
        {
            Assert.AreEqual(lhs.CollisionBuffer, rhs.CollisionBuffer, "CollisionBuffer differs");
            Assert.AreEqual(lhs.CollisionDetection, rhs.CollisionDetection, "CollisionDetection differs");
            Assert.IsTrue(new FontEqualityComparer().Equals(lhs.Font, rhs.Font), "Font differs");
            Assert.AreEqual(lhs.ForeColor, rhs.ForeColor, "ForeColor differs");
            Assert.AreEqual(((SolidBrush)lhs.BackColor).Color, ((SolidBrush)rhs.BackColor).Color, "BackColor differs");
            SurrogatesTest.ComparePens(lhs.Halo, rhs.Halo);

            //ToDo Test more properties
            return(true);
        }
示例#2
0
        public static bool AreVectorStylesEqual(VectorStyle lhs, VectorStyle rhs)
        {
            AreStylesEqual(lhs, rhs);

            Assert.AreEqual(lhs.PointSize, rhs.PointSize);
            Assert.AreEqual(((SolidBrush)lhs.PointColor).Color, ((SolidBrush)rhs.PointColor).Color);

            SurrogatesTest.ComparePens(lhs.Line, rhs.Line, "Line");
            Assert.AreEqual(lhs.Line.PenType, rhs.Line.PenType);
            Assert.AreEqual(lhs.Line.Color, rhs.Line.Color);
            Assert.AreEqual(lhs.EnableOutline, rhs.EnableOutline);
            Assert.AreEqual(lhs.Outline.PenType, rhs.Outline.PenType);
            Assert.AreEqual(lhs.Outline.Color, rhs.Outline.Color);

            Assert.AreEqual(lhs.Fill.GetType(), rhs.Fill.GetType());

            //ToDo: Test more properties
            return(true);
        }