public void TestExceptionEnumerations_FromPrivateMethod() { var type = GetTypeDef <ExceptionTestClass> (); var member = type.Methods.Single(m => m.Name == "ThrowFromPrivateMethod"); var sources = new ExceptionLookup(ExceptionLocations.DependentAssemblies)[member]; Assert.IsNotNull(sources); Assert.AreEqual(0, sources.Count()); }
public void TestExceptionEnumerations_FromPublicMethod() { var type = GetTypeDef <ExceptionTestClass> (); var member = type.Methods.Single(m => m.Name == "ThrowFromPublicMethod"); var sources = new ExceptionLookup(ExceptionLocations.Assembly)[member]; Assert.IsNotNull(sources); Assert.AreEqual(1, sources.Count()); var source = sources.First(); Assert.AreEqual("ThrowItPublic", source.Sources.First().Name); }