public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { EnumerateTestCommands__Called = true; EnumerateTestCommands_TestMethod = testMethod; return(EnumerateTestCommands__Result ?? testClassCommand.EnumerateTestCommands(testMethod)); }
public void SettingSkipReasonGeneratesSkipCommand() { MethodInfo method = typeof(ClassWithSkippedTest).GetMethod("SkippedTest"); TestClassCommand classCommand = new TestClassCommand(typeof(ClassWithSkippedTest)); var commands = new List <ITestCommand>(classCommand.EnumerateTestCommands(Reflector.Wrap(method))); ITestCommand command = Assert.Single(commands); SkipCommand skipCommand = Assert.IsType <SkipCommand>(command); Assert.Equal("My Skip Reason", skipCommand.Reason); }
public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { foreach (var testCommand in _cmd.EnumerateTestCommands(testMethod)) { if (testCommand is MediumTrustTestCommand) { yield return(testCommand); continue; } yield return(new MediumTrustTestCommand(testCommand, null)); } }
public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { foreach (var attr in testMethod.GetCustomAttributes(typeof(FactAttribute))) { if (!String.IsNullOrEmpty(attr.GetPropertyValue <String>("Skip"))) { yield break; } } foreach (var testCommand in _cmd.EnumerateTestCommands(testMethod)) { if (testCommand is MediumTrustTestCommand) { yield return(testCommand); continue; } yield return(new MediumTrustTestCommand(testCommand, null)); } }
public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { return(cmd.EnumerateTestCommands(testMethod)); }
/// <inheritdoc/> public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { return(_testClassCommand.EnumerateTestCommands(testMethod) .Select(c => (ITestCommand) new IocLifetimeCommand(c, testMethod))); }
public IEnumerable <ITestCommand> EnumerateTestCommands(IMethodInfo testMethod) { return(originalTestClassCommand.EnumerateTestCommands(testMethod)); }