public void PickMissions_PickSomeMissions_ReturnTrue() { var missions = new List <MissionInfo>(); missions.Add(new MissionInfo()); _warrior.Setup(w => w.PickMissions(It.IsAny <List <MissionInfo> >())) .Returns(missions); var result = _missionBoard.PickMissions(); Assert.That(result, Is.EqualTo(true)); }
public void Play() { StartGame(); while (IsStillAlive()) { if (FeelExhausted()) { InfoHelper.DisplayRecoverHP(_store.RecoverHP()); } // make your level is as high as possible _store.LevelUp(); InfoHelper.DisplayLevelUp(); _missionBoard.RefreshMissionBoard(); InfoHelper.DisplayMissionBoardIsRefreshed(); // if pick nothing, The Missions Board will be refreshed. if (!_missionBoard.PickMissions()) { continue; } // when The Mission Board is empty, buy items and refresh the board. while (!_missionBoard.MissionBoardIsEmpty()) { // when the mission is failed, buy items and refresh the board. if (!_missionBoard.PerformTheMission()) { IsFailed(); break; } IsSucceeded(); } } EndGame(); }