2007-06-13から1日間の記事一覧

publicでないメソッドをテストのために呼び出す

System.Reflection.MethodInfo method = typeof (ClassToTest).GetMethod("MethodToInvoke", BindingFlags.Instance | BindingFlags.NonPublic); object result = method.Invoke(new ClassToTest(), new object[] {"MethodArguments"});