public void CreateByNameThrowsExceptionWithNullExecuteStrategy()
        {
            var sut = new EnumerableTypeCreatorWrapper();

            Action action = () => sut.CreateByName(null !, typeof(string), null !, null !);

            action.Should().Throw <ArgumentNullException>();
        }
        public void CreateInstanceThrowsExceptionWithNullType()
        {
            var executeStrategy = Substitute.For <IExecuteStrategy>();

            var sut = new EnumerableTypeCreatorWrapper();

            Action action = () => sut.CreateValue(executeStrategy, null !, null !, null !);

            action.Should().Throw <ArgumentNullException>();
        }
        public void CreateChildItemThrowsExceptionWithNullExecuteStrategy()
        {
            var person = new Person();

            var sut = new EnumerableTypeCreatorWrapper();

            Action action = () => sut.CreateItem(typeof(Person), null !, person);

            action.Should().Throw <ArgumentNullException>();
        }
        public void PopulateInstanceThrowExceptionWhenTypeNotEnumerable()
        {
            var executeStrategy = Substitute.For <IExecuteStrategy>();
            var configuration   = Substitute.For <IBuildConfiguration>();

            var item = new object();

            executeStrategy.Configuration.Returns(configuration);

            var sut = new EnumerableTypeCreatorWrapper();

            Action action = () => sut.PopulateItem(executeStrategy, item);

            action.Should().Throw <BuildException>();
        }
        public void CreateChildItemThrowsExceptionWithNullExecuteStrategyTest()
        {
            var person = new Person();

            var target = new EnumerableTypeCreatorWrapper();

            Action action = () => target.CreateItem(typeof(Person), null, person);

            action.ShouldThrow<ArgumentNullException>();
        }