public void MoveRobberNullTileFails() { var initial = new Mock<ITile>(); initial.Setup(t => t.Rawmaterial).Returns(MaterialType.Unsourced); var robber = new Robber(initial.Object); Assert.Throws<ArgumentNullException>(() => robber.Move(null)); }
public void TestRobberConstruction() { var tile = new Mock<ITile>(); tile.Setup(t => t.Rawmaterial).Returns(MaterialType.Unsourced); var robber = new Robber(tile.Object); Assert.Equal(tile.Object, robber.CurrentTile); }
public void CantMoveRobberToTheSea() { var initial = new Mock<ITile>(); initial.Setup(t => t.Rawmaterial).Returns(MaterialType.Unsourced); var input = new Mock<ITile>(); input.Setup(t => t.Rawmaterial).Returns(MaterialType.Sea); var robber = new Robber(initial.Object); Assert.Throws<ArgumentException>(() => robber.Move(input.Object)); }
public void MoveTest(MaterialType type) { var initial = new Mock<ITile>(); initial.Setup(t => t.Rawmaterial).Returns(MaterialType.Unsourced); var input = new Mock<ITile>(); input.Setup(t => t.Rawmaterial).Returns(type); var robber = new Robber(initial.Object); robber.Move(input.Object); Assert.Equal(input.Object, robber.CurrentTile); }