public void GetScenarioDecorators_should_return_empty_collection_if_method_and_declaring_type_does_not_have_extensions() { Action step = new Feature_type().Some_method_without_arguments; var extensions = _metadataProvider.GetScenarioDecorators(new ScenarioDescriptor(step.GetMethodInfo(), null)); Assert.That(extensions, Is.Empty); }
public void GetStepDecorators_should_return_empty_collection_if_method_and_declaring_type_does_not_have_extensions() { Action <int, string> step = new Feature_type().Some_method_with_argument_arg1_and_arg2; var extensions = _metadataProvider.GetStepDecorators(new StepDescriptor(step.GetMethodInfo(), (o, a) => Task.FromResult(DefaultStepResultDescriptor.Instance))); Assert.That(extensions, Is.Empty); }
public void GetScenarioDecorators_should_return_extensions_in_order_if_declaring_type_does_not_have_extensions() { Action <int> step = new Feature_type().Some_method; var extensions = _metadataProvider.GetScenarioDecorators(new ScenarioDescriptor(step.GetMethodInfo(), null)); var expectedOrder = new[] { -5, -3, -2, 0 }; Assert.That(extensions.Cast <IScenarioDecoratorAttribute>().Select(x => x.Order).ToArray(), Is.EqualTo(expectedOrder)); }
public void GetStepDecorators_should_return_extensions_in_order_if_declaring_type_does_not_have_extensions() { Action <int> step = new Feature_type().Some_step_with_argument; var extensions = _metadataProvider.GetStepDecorators(new StepDescriptor(step.GetMethodInfo(), (o, a) => Task.FromResult(DefaultStepResultDescriptor.Instance))); var expectedOrder = new[] { 0, 2, 3, 5 }; Assert.That(extensions.Cast <IStepDecoratorAttribute>().Select(x => x.Order).ToArray(), Is.EqualTo(expectedOrder)); }