public void CanCreateThrowsExceptionWithNullTypeTest() { var target = new EnumerableTypeCreator(); Action action = () => target.CanCreate(null, null, null); action.ShouldThrow<ArgumentNullException>(); }
public void CanCreateReturnsWhetherTypeIsSupportedTest(Type type, bool supported) { var target = new EnumerableTypeCreator(); var actual = target.CanCreate(type, null, null); actual.Should().Be(supported); }
public void CanCreateThrowsExceptionWithNullProperty() { var executeStrategy = Substitute.For <IExecuteStrategy>(); var configuration = Substitute.For <IBuildConfiguration>(); executeStrategy.Configuration.Returns(configuration); var sut = new EnumerableTypeCreator(); Action action = () => sut.CanCreate(configuration, null !, (PropertyInfo)null !); action.Should().Throw <ArgumentNullException>(); }
public void CanCreateReturnsWhetherTypeIsSupportedTest(Type type, bool supported) { var executeStrategy = Substitute.For <IExecuteStrategy>(); var configuration = Substitute.For <IBuildConfiguration>(); executeStrategy.Configuration.Returns(configuration); var sut = new EnumerableTypeCreator(); var actual = sut.CanCreate(configuration, null !, type); actual.Should().Be(supported); }