public void Unit_MethodConstructor2() { try { DocumentationFilter.MethodConstructor(typeof(Tests), "(System.Int32,System.IO.Stream)"); Assert.Fail(); } catch (System.Exception) { } }
public void Unit_MethodConstructor() { var constructor = typeof(Tests).GetConstructors(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)[0]; Assert.NotNull(constructor); var actual = DocumentationFilter.MethodConstructor(typeof(Tests), "(System.String,System.NullReferenceException)"); Assert.AreEqual(constructor.IsPublic, actual); }