Throws exception on call methods
szymonpiekny opened this issue · comments
szymonpiekny commented
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>();
Florian Greinacher commented
@szymonpiekny You should already be able to this, see #826 (comment) for one possibility using Moq
.
Florian Greinacher commented
I'm closing this. Feel free to reopen if something is unclear!