Skip to content

Instantly share code, notes, and snippets.

@Fodsuk
Created February 12, 2013 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fodsuk/4771138 to your computer and use it in GitHub Desktop.
Save Fodsuk/4771138 to your computer and use it in GitHub Desktop.
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