Created
February 12, 2013 16:32
-
-
Save Fodsuk/4771138 to your computer and use it in GitHub Desktop.
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
namespace Vanquis.NewBusiness.Loans.Services.Tests.Utils | |
{ | |
public class ExpectArugmentNullExceptionAttribute : ExpectedExceptionAttribute | |
{ | |
public ExpectArugmentNullExceptionAttribute(string message) | |
: base(typeof(ArgumentNullException)) | |
{ | |
ExpectedMessage = message; | |
MatchType = MessageMatch.Contains; | |
} | |
public ExpectArugmentNullExceptionAttribute(string message, MessageMatch messageMatch) | |
: base(typeof(ArgumentNullException)) | |
{ | |
ExpectedMessage = message; | |
MatchType = messageMatch; | |
} | |
} | |
} | |
//EXAMPLE | |
[Test] | |
[ExpectArugmentNullException("Parameter name: sessionState")] | |
public void Constructor_WithNullHttpSessionStateBase_Throws2() | |
{ | |
var store = new DefaultAuthenticatedUserStore(null); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment