public ActionResult AsciiMapPath(AsciiForm formData) { if (formData.AsciiMap == null || !ModelState.IsValid) { return(Json(new { ErrorMessage = "Txt file with ASCII map is required" }, @"application/json")); } var result = AsciiMapService.ProcessUploadedFile(formData.AsciiMap); return(Json(new { MapResult = result }, @"application/json")); }
public void AsciiMapPath() { AsciiFormController controller = new AsciiFormController(); AsciiForm formData = new AsciiForm() { AsciiMap = null }; var result = controller.AsciiMapPath(formData); Assert.IsInstanceOfType(result, typeof(ActionResult)); }
public static void Run(AsciiForm asciiForm) { var app = new AsciiApplication(asciiForm); }
private AsciiApplication(AsciiForm asciiForm) { m_asciiForm = asciiForm; m_asciiForm.Invalidate(); }