public void IsSearchTargetFound_PassEmptySearchTarget_ReturnsFalse() { //arrange ILinearView linearView = null; var serachOrientation = new SearchOrientation(linearView); //act bool actual = serachOrientation.IsSearchTargetFound(""); //assert Assert.False(actual); }
public void GetCoordinatesOfSearchTarget_PassEmptySearchTarget_ReturnsEmptyString() { //arrange ILinearView linearView = null; var serachOrientation = new SearchOrientation(linearView); //act PointList actual = serachOrientation.GetCoordinatesOfSearchTarget(""); //assert Assert.True(actual == null); }
public void GetCoordinatesOfSearchTarget_NxNGridContainsTargetInLeftRightOrientation_CoordinatesReturned() { //arrange var serachOrientation = new SearchOrientation(new GridToLinearHorizontalStrategyMock(null)); //act PointList actual = serachOrientation.GetCoordinatesOfSearchTarget("A"); //assert Assert.Equal(new PointList() { new Point(0, 0) }, actual); }
/// <summary> /// Initializes a new instance of this class. /// </summary> /// <param name="game">Game that the game component should be attached to.</param> public AbstractSearch(Game game) : base(game) { state = SearchState.NotStarted; path = null; configuration = SearchConfiguration.NotTimed; orientation = SearchOrientation.Clockwise; type = SearchType.FourWay; map = null; timeLimit = (float)game.TargetElapsedTime.TotalMilliseconds; elapsedTime = 0.0f; totalTime = 0.0f; iterations = 0; totalIterations = 0; updateCalls = 0; }