I need to write a unit test for the next function and I saw I can use [ExpectedException]
this is the function to be tested.
public static T FailIfEnumIs
You must use ExpectedException differently:
ExpectedException
[TestMethod] [ExpectedException(typeof(ArgumentOutOfRangeException))] public void MyTestSomething()
and then code your test so that the expected exception gets thrown.