public void CountTheNumberOfFunction() { ReflectMe instance = new ReflectMe(); Type instanceType = instance.GetType(); var methods = instanceType.GetMethods(); Assert.AreEqual(instanceType.GetMethods().Length, 6); }
public void FindDO() { ReflectMe instance = new ReflectMe(); Type instanceType = instance.GetType(); var methods = instanceType.GetMethods(); foreach(var method in methods) { if(method.Name == "Do") { method.GetCustomAttributes(true); } } Assert.Fail("Method Do Wasnet found"); }