Skip to content

Please Enable TestingHelpers to throw Exceptions #442

Closed

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))

Activity

  1. fgreinacher commented on Mar 9, 2019

    @fgreinacher
    Contributor

    Duplicate of #168 - consider leaving your thumbs up there to show support :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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