Ejemplo n.º 1
0
        public void TryGetInfo_inside_test_method()
        {
            var res = new CallStackReflector().TryGetLocation();

            Assert.IsTrue(res.Filepath.EndsWith("ReflectorTest.cs"));
            Assert.AreEqual(37, res.LineNumber);
        }
Ejemplo n.º 2
0
        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);
        }