Skip to content

Instantly share code, notes, and snippets.

@tabareh
Last active March 1, 2018 10:46
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 tabareh/9241ee43bb2bee240ff7c4c61c5119ce to your computer and use it in GitHub Desktop.
Save tabareh/9241ee43bb2bee240ff7c4c61c5119ce to your computer and use it in GitHub Desktop.
[Verify exception] #Discipline_Test
[TestMethod]
[TestCategory(TestCategory.Gated)]
public void Will_throw_exception_on_invalid_branch_unit_code()
{
//Act
Action moreDigits=() =>
{
var result = _legalUnitStrategy.Transform("L9010");
};
//Assert
moreDigits.ShouldThrow<ArgumentException>();
// if we have an async method then we need to use something like this
//Func<Task> func = async() => await SomeAsyncMethod()
//func.ShouldThrow<WorkOrderException>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment