public void TryGetInfo_inside_test_method() { var res = new CallStackReflector().TryGetLocation(); Assert.IsTrue(res.Filepath.EndsWith("ReflectorTest.cs")); Assert.AreEqual(37, res.LineNumber); }
public void TryGetInfo_inside_AssertThrowsLambda_expected_outside_lambda() { UnitTestLocationInfo res = null; Assert.DoesNotThrow(() => res = new CallStackReflector().TryGetLocation()); Assert.IsTrue(res.Filepath.EndsWith("ReflectorTest.cs")); Assert.AreEqual(60, res.LineNumber); }