public void Test1() { var cache = new MemoryCache(new MemoryCacheOptions()); var controller = new AnalyzeController(); controller.SelectRegion(""); Assert.Pass(); }
public async Task TestValidUpload() { // Arrange var file = new List <IFormFile>(); var ms = new MemoryStream(); using (var fileStream = File.OpenRead("../../../testDcmFile.dcm")) { fileStream.CopyTo(ms); } file.Add(new FormFile(ms, 0, ms.Length, "files", "welp.dcm")); var result = await _oc.UploadFile(file) as RedirectToActionResult; result.RouteValues.TryGetValue("FileName", out var filePath); var srResult = _ac.SelectRegion(filePath as string) as ViewResult; srResult.ViewData.TryGetValue("FileName", out var fileNameTransferred); Assert.AreEqual(filePath, fileNameTransferred); }