ModelBuilder.UnitTests.EnumerableTypeCreatorTests.PopulateAddsItemsToListFromExecuteStrategyTest C# (CSharp) Method

PopulateAddsItemsToListFromExecuteStrategyTest() private method

private PopulateAddsItemsToListFromExecuteStrategyTest ( ) : void
return void
        public void PopulateAddsItemsToListFromExecuteStrategyTest()
        {
            var expected = new List<Guid>();

            var strategy = Substitute.For<IExecuteStrategy>();

            strategy.CreateWith(typeof(Guid)).Returns(Guid.NewGuid());

            var target = new EnumerableTypeCreator
            {
                AutoPopulateCount = 15
            };

            var actual = target.Populate(expected, strategy);

            actual.Should().BeSameAs(expected);

            var set = (List<Guid>) actual;

            set.Should().HaveCount(target.AutoPopulateCount);
            set.All(x => x != Guid.Empty).Should().BeTrue();
        }