public Create ( IMethodInfo testMethod, ISpecimenBuilderFactory builderFactory ) : IEnumerable |
||
testMethod | IMethodInfo | /// Information about a test method. /// |
builderFactory | ISpecimenBuilderFactory | /// A factory of test fixture. /// |
리턴 | IEnumerable |
public void CreateReturnsEmptyCommandIfTestMethodIsParameterized() { var sut = new FactCommandFactory(); var method = new Methods<FactCommandFactoryTest>().Select(x => x.ParameterizedMethod(null, 0)); var actual = sut.Create(Reflector.Wrap(method), null); Assert.Empty(actual); }
public void CreateReturnsCorrectCommandIfTestMethodIsValid(MethodInfo method) { var sut = new FactCommandFactory(); var expected = method.ReflectedType.FullName + "." + method.Name; var actual = sut.Create(Reflector.Wrap(method), null).Single(); var command = Assert.IsAssignableFrom<FactCommand>(actual); Assert.Equal(expected, command.DisplayName); }
public void CreateWithNullTestMethodThrows() { var sut = new FactCommandFactory(); Assert.Throws<ArgumentNullException>(() => sut.Create(null, null).ToArray()); }