Пример #1
0
        public void Rotation_Shoud_Get_South_CCW()
        {
            // Arrange
            var rotation = new Rotation();

            // Act
            rotation = rotation.AddDegree(-90);
            rotation = rotation.AddDegree(-90);

            // Assert
            Assert.Equal("S", rotation.GetDirection());
        }
Пример #2
0
        public void Rotation_Shoud_Get_West_CW()
        {
            // Arrange
            var rotation = new Rotation();

            // Act
            rotation = rotation.AddDegree(90);
            rotation = rotation.AddDegree(90);
            rotation = rotation.AddDegree(90);

            // Assert
            Assert.Equal("W", rotation.GetDirection());
        }
Пример #3
0
        public void Rotation_Shoud_Add_Degree()
        {
            // Arrange
            var rotation = new Rotation();

            // Act
            rotation = rotation.AddDegree(90);

            // Assert
            Assert.Equal(90, rotation.Degree);
        }