public void Tests(MethodInfo method, RunState state) { Test built = _sut.BuildFrom(method); Assert.That(built, Is.InstanceOf(typeof(NUnitTestMethod))); Assert.That(built.RunState, Is.EqualTo(state)); }
public static NUnitTestMethod MakeTestCase(Type type, string methodName) { return((NUnitTestMethod)testBuilder.BuildFrom(Reflect.GetNamedMethod( type, methodName, BindingFlags.Public | BindingFlags.Instance))); }
public static Test MakeTestCase(Type type, string methodName) { MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Assert.Fail("Method not found: " + methodName); } return(testBuilder.BuildFrom(method)); }
public static Test MakeTestCase(Type type, string methodName) { MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Assert.Fail("Unable to find method {0} in type {1}", methodName, type.FullName); } return(testBuilder.BuildFrom(method)); }