Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created January 26, 2018 09:07
Show Gist options
  • Select an option

  • Save selcukusta/38912a56eab2d8483dfdd1601c220bcc to your computer and use it in GitHub Desktop.

Select an option

Save selcukusta/38912a56eab2d8483dfdd1601c220bcc to your computer and use it in GitHub Desktop.
public class MathFunctionsFixture
{
[Theory, ClassData(typeof(ExceptionTestTheoryData))]
public void Divide_ShouldAssertsTrue_WhenCultureSecondValueIsZero(ExceptionTestParameter parameter)
{
var exceptionType = Assert.ThrowsAny<SystemException>(() => parameter.FirstValue / parameter.SecondValue);
Assert.True(exceptionType.GetType().IsAssignableFrom(parameter.ExceptedException));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment