예제 #1
0
        public static void LocalCoordinates_Returns_Coordinates_of_Vertices_in_Original_Local_Coordinates()
        {
            Rhombus rhombus = new Rhombus(width, height);
            IList <CartesianCoordinate> coordinates = rhombus.LocalCoordinates();

            Assert.AreEqual(width / 2, coordinates[0].X);
            Assert.AreEqual(0, coordinates[0].Y);

            Assert.AreEqual(width, coordinates[1].X);
            Assert.AreEqual(height / 2, coordinates[1].Y);

            Assert.AreEqual(width / 2, coordinates[2].X);
            Assert.AreEqual(height, coordinates[2].Y);

            Assert.AreEqual(0, coordinates[3].X);
            Assert.AreEqual(height / 2, coordinates[3].Y);
        }