public void TestGetCurrentAreaWhenCurrentNotSet() { var area = AreasForShowAndTests.GetAreaForShow(); game = new Game(new[] { area }); Assert.AreEqual(game.AreaBlock.GetCurrentArea(), area); }
public void TestTryChangeArea(int index) { var list = new List <Area> { AreasForShowAndTests.GetAreaForShow(), AreasForShowAndTests.GetAreaForTests() }; game = new Game(list.ToArray(), 0); var isSuccess = game.AreaBlock.TryChangeArea(index); if (index < 0 || index >= 2) { Assert.IsFalse(isSuccess); Assert.AreEqual(list[0], game.AreaBlock.GetCurrentArea()); } else { Assert.IsTrue(isSuccess); Assert.AreEqual(list[index], game.AreaBlock.GetCurrentArea()); } }
public void Setup() { area = AreasForShowAndTests.GetAreaForTests(); }