예제 #1
0
        public void T02bSidePlayerIsOn_ReturnsFront()
        {
            var doorDirection = new Vector3(-1, 0, 0);
            var doorPosition  = new Vector3(0, 0, 0);
            var doorMock      = new DoorMock(doorPosition, doorDirection);

            var playerPos    = new Vector3(-10, 0, 0);
            var playerMock   = new PlayerMock(playerPos);
            var sut          = new DoorDetection(doorMock, playerMock);
            var playerSideOn = sut.PlayerSideOn();

            Assert.AreEqual(DoorDetection.DoorSide.Front, playerSideOn);
        }
예제 #2
0
        public void T01dSidePlayerIsOn_ReturnsBack()
        {
            var doorDirection = new Vector3(0, 0, 1);
            var doorPosition  = new Vector3(0, 0, 0);
            var doorMock      = new DoorMock(doorPosition, doorDirection);

            var playerPos    = new Vector3(2, 0, -1);
            var playerMock   = new PlayerMock(playerPos);
            var sut          = new DoorDetection(doorMock, playerMock);
            var playerSideOn = sut.PlayerSideOn();

            Assert.AreEqual(DoorDetection.DoorSide.Back, playerSideOn);
        }