Skip to content

Please Enable TestingHelpers to throw Exceptions #442

@Rainer1

Description

@Rainer1

It quite some scenarios it is necessary to ensure by UnitTests, that the written code handles Exceptions correctly which are thrown by the file system.
For this reason it would be great to be able to define a Exception to be thrown, when a specific Method Is called.
Example Similar to many Mocking Frameworks:
MockFileSystem.File.Delete.WhenCalled( (file) => throw new IOException(message))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions