public void leftBoundryTest() { var mockAvatarBehaviour = new Mock<IAvatarBehaviour>(); var mockUserInput = new Mock<IUserInput>(); Avatar av = new Avatar(mockAvatarBehaviour.Object, mockUserInput.Object); av.Left(); Assert.AreEqual(1, av.Track); av.Left(); Assert.AreEqual(1, av.Track); }
public void avatarMovementTest() { var mockAvatarBehaviour = new Mock<IAvatarBehaviour>(); var mockUserInput = new Mock<IUserInput>(); Avatar av = new Avatar(mockAvatarBehaviour.Object, mockUserInput.Object); av.Left(); Assert.AreEqual(1, av.Track); av.Right(); Assert.AreEqual(2, av.Track); av.Right(); Assert.AreEqual(3, av.Track); av.Left(); Assert.AreEqual(2, av.Track); }