Esempio n. 1
0
        public void TestSetCoodinates()
        {
            EcellLayout layout = new EcellLayout();
            layout.X = 10;
            Assert.AreEqual(new PointF(10, 0), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(0, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 0, 0, 0), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(0, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(0, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(0, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(0, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(10, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(SizeF.Empty, layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(10, 0), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(10, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(0, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(10, 20, 100, 200);
            layout.Y = 50;
            Assert.AreEqual(new PointF(10, 50), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(50, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 50, 100, 200), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(100, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(200, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(50, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(250, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(110, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(100, 200), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(60, 150), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(60, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(150, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(10, 50, 100, 200);
            layout.Width = 200;
            Assert.AreEqual(new PointF(10, 50), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(50, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 50, 200, 200), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(200, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(200, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(50, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(250, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(210, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(200, 200), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(110, 150), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(110, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(150, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(10, 50, 200, 200);
            layout.Height = 100;
            Assert.AreEqual(new PointF(10, 50), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(50, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 50, 200, 100), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(200, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(100, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(50, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(150, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(210, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(200, 100), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(110, 100), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(110, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(100, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(10, 50, 200, 100);
            layout.Location = new PointF(100, 100);
            Assert.AreEqual(new PointF(100, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(100, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(100, 100, 200, 100), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(200, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(100, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(200, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(100, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(300, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(200, 100), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(200, 150), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(200, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(150, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 200, 100);
            layout.Size = new SizeF(60, 40);
            Assert.AreEqual(new PointF(100, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(100, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(100, 100, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(140, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(100, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(160, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(130, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(130, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 60, 40);
            layout.Rect = new RectangleF(0.5f, 0.2f, 0.4f, 0.2f);
            Assert.AreEqual(new PointF(0.5f, 0.2f), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(0.5f, layout.X, "X is unexpected value.");
            Assert.AreEqual(0.2f, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(0.5f, 0.2f, 0.4f, 0.2f), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(0.4f, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(0.2f, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(0.2f, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(0.4f, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(0.5f, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(0.9f, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(0.4f, 0.2f), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(0.7f, 0.3f), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(0.7f, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(0.3f, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 60, 40);
            layout.Offset = new PointF(60, 40);
            Assert.AreEqual(new PointF(100, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(100, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(100, 100, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(140, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(100, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(160, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(130, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(130, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(new PointF(60, 40), layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(60, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(40, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 60, 40);
            layout.OffsetX = 60;
            Assert.AreEqual(new PointF(100, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(100, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(100, 100, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(140, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(100, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(160, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(130, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(130, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(new PointF(60, 0), layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(60, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 60, 40);
            layout.OffsetY = 40;
            Assert.AreEqual(new PointF(100, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(100, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(100, 100, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(140, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(100, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(160, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(130, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(130, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(new PointF(0, 40), layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(40, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(100, 100, 60, 40);
            layout.CenterX = 50;
            Assert.AreEqual(new PointF(20, 100), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(20, layout.X, "X is unexpected value.");
            Assert.AreEqual(100, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(20, 100, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(100, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(140, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(20, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(80, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(50, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(50, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(20, 100, 60, 40);
            layout.CenterY = 50;
            Assert.AreEqual(new PointF(20, 30), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(20, layout.X, "X is unexpected value.");
            Assert.AreEqual(30, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(20, 30, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(30, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(70, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(20, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(80, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(50, 50), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(50, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(50, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(20, 30, 60, 40);
            layout.Center = new PointF(100, 100);
            Assert.AreEqual(new PointF(70, 80), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(70, layout.X, "X is unexpected value.");
            Assert.AreEqual(80, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(70, 80, 60, 40), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(60, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(40, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(70, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(130, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(80, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(120, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(new SizeF(60, 40), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(100, 100), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(100, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(100, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");
        }
Esempio n. 2
0
        public void TestConstructors()
        {
            EcellLayout layout = new EcellLayout();
            Assert.AreEqual(PointF.Empty, layout.Location, "Location is unexpected value.");
            Assert.AreEqual(0, layout.X, "X is unexpected value.");
            Assert.AreEqual(0, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(RectangleF.Empty, layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(0, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(0, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(0, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(0, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(0, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(0, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(SizeF.Empty, layout.Size, "Size is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Center, "Center is unexpected value.");
            Assert.AreEqual(0, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(0, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual("", layout.Figure, "Figure is unexpected value.");
            Assert.AreEqual(true, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            PointF point = new PointF(10, 20);
            layout = new EcellLayout(point);
            Assert.AreEqual(new PointF(10, 20), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(20, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 20, 0, 0), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(0, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(0, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(20, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(20, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(10, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(SizeF.Empty, layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(10, 20), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(10, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(20, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            layout = new EcellLayout(10, 20, 100, 200);
            layout.Layer = "Layer";
            layout.Figure = "Figure";
            Assert.AreEqual(new PointF(10, 20), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(20, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 20, 100, 200), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(100, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(200, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(20, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(220, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(110, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(100, 200), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(60, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(60, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("Layer", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual("Figure", layout.Figure, "Figure is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");

            RectangleF rect = new RectangleF(10, 20, 100, 200);
            layout = new EcellLayout(rect);
            layout.Layer = "Layer2";
            Assert.AreEqual(new PointF(10, 20), layout.Location, "Location is unexpected value.");
            Assert.AreEqual(10, layout.X, "X is unexpected value.");
            Assert.AreEqual(20, layout.Y, "Y is unexpected value.");
            Assert.AreEqual(new RectangleF(10, 20, 100, 200), layout.Rect, "Rect is unexpected value.");
            Assert.AreEqual(100, layout.Width, "Width is unexpected value.");
            Assert.AreEqual(200, layout.Height, "Height is unexpected value.");
            Assert.AreEqual(20, layout.Top, "Top is unexpected value.");
            Assert.AreEqual(220, layout.Bottom, "Bottom is unexpected value.");
            Assert.AreEqual(10, layout.Left, "Left is unexpected value.");
            Assert.AreEqual(110, layout.Right, "Right is unexpected value.");
            Assert.AreEqual(new SizeF(100, 200), layout.Size, "Size is unexpected value.");
            Assert.AreEqual(new PointF(60, 120), layout.Center, "Center is unexpected value.");
            Assert.AreEqual(60, layout.CenterX, "CenterX is unexpected value.");
            Assert.AreEqual(120, layout.CenterY, "CenterY is unexpected value.");
            Assert.AreEqual(PointF.Empty, layout.Offset, "Offset is unexpected value.");
            Assert.AreEqual(0, layout.OffsetX, "OffsetX is unexpected value.");
            Assert.AreEqual(0, layout.OffsetY, "OffsetY is unexpected value.");
            Assert.AreEqual("Layer2", layout.Layer, "Layer is unexpected value.");
            Assert.AreEqual(false, layout.IsEmpty, "IsEmpty is unexpected value.");
            Assert.AreNotEqual(0, layout.GetHashCode(), "GetHashCode method returned unexpected value.");
        }