You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me I setup the ReadFormAsync() that was used in my controller to get the Forms and then the Files.
var file = new FormFile(new MemoryStream(Encoding.UTF8.GetBytes("This is a dummy file")), 0, 20, "Data", "dummy.txt");
httpContextMock.RequestMock.Mock.Setup(s => s.ReadFormAsync(It.IsAny<CancellationToken>())).ReturnsAsync(new FormCollection(new Dictionary<string, StringValues>(), new FormFileCollection { file }));
Currently there doesn't seem to be a way to mock a context that holds a file.
The text was updated successfully, but these errors were encountered: