public void CreateWithNonParameterizedTestMethodReturnsEmpty() { var method = (MethodInfo)MethodBase.GetCurrentMethod(); var sut = new ParameterizedCommandFactory(); var actual = sut.Create(Reflector.Wrap(method), null); Assert.Empty(actual); }
public void CreateWithParameterizedTestMethodWithReturnValueReturnsCorrectMethod() { var method = Reflector.Wrap(new Methods<ParameterizedCommandFactoryTest>().Select( x => x.ParameterizedTestMethodWithReturnValue(null))); var sut = new ParameterizedCommandFactory(); var factory = Mocked.Of<ISpecimenBuilderFactory>(); var actual = sut.Create(method, factory).Single(); var command = Assert.IsAssignableFrom<ParameterizedCommand>(actual); var context = Assert.IsAssignableFrom<ParameterizedCommandContext>(command.TestCommandContext); Assert.Equal(method, context.TestMethod); Assert.Equal(factory, context.BuilderFactory); Assert.Empty(context.ExplicitArguments); }
public void SutIsTestCommandFactory() { var sut = new ParameterizedCommandFactory(); Assert.IsAssignableFrom<ITestCommandFactory>(sut); }