System.IO.Abstractions
System.IO.Abstractions copied to clipboard
Throws exception on call methods
Is your feature request related to a problem? Please describe. It should be possible to throw exception while call methods on FileSystemMock.
Describe the solution you'd like
_fileSystemMock.Setup(q => q.File.WriteAllText(It.IsAny<string>(), It.IsAny())).Throws<OutOfMemoryException>();
@szymonpiekny You should already be able to this, see https://github.com/TestableIO/System.IO.Abstractions/issues/826#issuecomment-1081702068 for one possibility using Moq.
I'm closing this. Feel free to reopen if something is unclear!