forked from nsubstitute/NSubstitute
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use custom exception on protected method mock errors and additional…
… unit tests to verify error conditions * Rename unit tests with better description
- Loading branch information
1 parent
88998b2
commit 3d9bee0
Showing
6 changed files
with
143 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/NSubstitute/Exceptions/ProtectedMethodNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace NSubstitute.Exceptions; | ||
|
||
public class ProtectedMethodNotFoundException(string message, Exception? innerException) : SubstituteException(message, innerException) | ||
{ | ||
public ProtectedMethodNotFoundException() : this("", null) | ||
{ } | ||
|
||
public ProtectedMethodNotFoundException(string message) : this(message, null) | ||
{ } | ||
} |
10 changes: 10 additions & 0 deletions
10
src/NSubstitute/Exceptions/ProtectedMethodNotVirtualException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace NSubstitute.Exceptions; | ||
|
||
public class ProtectedMethodNotVirtualException(string message, Exception? innerException) : SubstituteException(message, innerException) | ||
{ | ||
public ProtectedMethodNotVirtualException() : this("", null) | ||
{ } | ||
|
||
public ProtectedMethodNotVirtualException(string message) : this(message, null) | ||
{ } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters