public ActionResult <string> ProcessInBackground(List <IFormFile> files) { if (files.Count != 2) { return(BadRequest()); } var left = Image.FromStream(files[0].OpenReadStream()) as Bitmap; var right = Image.FromStream(files[1].OpenReadStream()) as Bitmap; return(_imageComparerManager.ProcessInBackground(left, right, 20).ToString()); }
public void ProcessInBackground_LeftIsNull_ThrowsArgumentNullException() { Assert.Throws <ArgumentNullException>(() => _comparerManager.ProcessInBackground(null, _image, Threshold)); }