I would like to update this so that someone else can have the answer if needed.
I had to change the process of the test from a unit test to an integration test, I have also included the code below
using (var stream = File.OpenRead(@"./Images/Dart 1.jpg"))
var file = new FormFile(stream, 0, stream.Length, null, Path.GetFileName(@"./Images/Dart 1.jpg"))
Headers = new HeaderDictionary(),
ContentType = "image/jpeg"
var controller = new ScanController();
var result = controller.Scan(file);