Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion EasyFarm.Tests/Classes/ExecutorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Xunit;
using EasyFarm.Classes;
using EasyFarm.Parsing;
using EasyFarm.Tests.Context;
using EasyFarm.Tests.TestTypes;

namespace EasyFarm.Tests.Classes
Expand Down Expand Up @@ -56,7 +57,7 @@ public void UsedTargetedActionsWillUseAbilityNameToCastCommand()
IUnit unit = FindUnit();
Executor sut = new Executor(MockGameAPI);
// Exercise system
sut.UseTargetedActions(new List<BattleAbility> { battleAbility }, unit);
sut.UseTargetedActions(new TestContext(), new List<BattleAbility> { battleAbility }, unit);
// Verify outcome
Assert.Equal("/magic test <t>", MockGameAPI.Mock.Windower.LastCommand);
// Teardown
Expand Down
1 change: 1 addition & 0 deletions EasyFarm.Tests/Context/TestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class TestContext : IGameContext
public IUnit Target { get; set; }
public bool IsFighting { get; set; }
public Zone Zone { get; set; }
public NavMesh NavMesh { get; }
public IList<IUnit> Units { get; set; }
public IMemoryAPI API { get; set; }
public StateMemory Memory { get; set; }
Expand Down
10 changes: 10 additions & 0 deletions EasyFarm.Tests/TestTypes/Mocks/MockEliteAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ public void FaceHeading(Position position)
{
}

public void GotoWaypoint(Position position, bool keepRunning)
{
throw new System.NotImplementedException();
}

public void GotoNPC(int ID, Position position, bool keepRunning)
{
throw new System.NotImplementedException();
}

public void GotoWaypoint(Position position, bool useObjectAvoidance, bool keepRunning)
{
throw new System.NotImplementedException();
Expand Down
1 change: 1 addition & 0 deletions EasyFarm/Classes/NavMesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ private static Position ToFFXIPosition(float[] detourPosition)

}

// TODO: Do this instead of using Pathfinder.
public Queue<Position> FindPathBetween(Position start, Position end, bool useStraightPath = false)
{
var path = new Queue<Position>();
Expand Down
Loading