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); }
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); }