public void GivenListOfBuilders_WhenCallingBuildList_ThenAListOfUniqueEntitiesShouldBeReturned()
        {
            var builders = BasicCustomerBuilder.CreateListOfSize(5);

            var entities = builders.BuildList <Customer, BasicCustomerBuilder>();

            Assert.That(entities, Is.Unique);
        }
Пример #2
0
        public void GivenListOfBuilders_WhenCallingBuildListExplicitly_ThenAListOfEntitiesOfTheRightTypeShouldBeReturned()
        {
            var builders = BasicCustomerBuilder.CreateListOfSize(5);

            var entities = builders.BuildList();

            entities.ShouldBeAssignableTo <IList <Customer> >();
        }
        public void GivenListOfBuilders_WhenCallingBuildList_ThenAListOfEntitiesOfTheRightTypeShouldBeReturned()
        {
            var builders = BasicCustomerBuilder.CreateListOfSize(5);

            var entities = builders.BuildList <Customer, BasicCustomerBuilder>();

            Assert.That(entities, Has.All.With.TypeOf <Customer>());
        }
Пример #4
0
        public void GivenListOfBuilders_WhenCallingBuildListExplicitly_ThenAListOfUniqueEntitiesShouldBeReturned()
        {
            var builders = BasicCustomerBuilder.CreateListOfSize(5);

            var entities = builders.BuildList();

            entities.ShouldBeUnique();
        }
        public void GivenCreatingListOfSizeX_WhenListIsBuilt_ThenAListOfTheRightBuilderTypesIsGenerated()
        {
            var builderExpression = BasicCustomerBuilder.CreateListOfSize(5);

            var builtList = builderExpression.Build();

            Assert.That(builtList, Has.All.With.TypeOf <BasicCustomerBuilder>());
        }
Пример #6
0
        public void GivenListOfBuilders_WhenCallingBuildListExplicitly_ThenAListOfEntitiesOfTheRightSizeShouldBeReturned()
        {
            var builders = BasicCustomerBuilder.CreateListOfSize(5);

            var entities = builders.BuildList();

            entities.Count.ShouldBe(5);
        }
        public void GivenCreatingListOfSizeX_WhenListIsBuilt_ThenAListOfUniqueBuildersIsGenerated()
        {
            var builderExpression = BasicCustomerBuilder.CreateListOfSize(5);

            var builtList = builderExpression.Build();

            Assert.That(builtList, Is.Unique);
        }
        public void GivenCreatingListOfSizeX_WhenListIsBuilt_ThenAListOfTheRightSizeIsGenerated()
        {
            var builderExpression = BasicCustomerBuilder.CreateListOfSize(5);

            var builtList = builderExpression.Build();

            Assert.That(builtList, Has.Count.EqualTo(5));
        }
Пример #9
0
        public void GivenListOfBuilders_WhenCallingGetBuilders_ThenTheListOfBuildersShouldBeReturned()
        {
            var list = BasicCustomerBuilder.CreateListOfSize(5);

            var builders = list.GetBuilders();

            builders.ShouldSatisfyAllConditions(
                () => builders.ShouldBeAssignableTo <IEnumerable <BasicCustomerBuilder> >(),
                () => builders.Count().ShouldBe(5),
                () => builders.All(b => b != null),
                () => builders.ShouldBeUnique());
        }
Пример #10
0
        public void GivenListOfBuilders_WhenCallingBuildListImplicitly_ThenAListOfUniqueEntitiesShouldBeReturned()
        {
            List <Customer> entities = BasicCustomerBuilder.CreateListOfSize(5);

            entities[0].ShouldNotBe(entities[1]);
            entities[0].ShouldNotBe(entities[2]);
            entities[0].ShouldNotBe(entities[3]);
            entities[0].ShouldNotBe(entities[4]);
            entities[1].ShouldNotBe(entities[2]);
            entities[1].ShouldNotBe(entities[3]);
            entities[1].ShouldNotBe(entities[4]);
            entities[2].ShouldNotBe(entities[3]);
            entities[2].ShouldNotBe(entities[4]);
            entities[3].ShouldNotBe(entities[4]);
        }
Пример #11
0
        public void GivenListOfBuilders_WhenCallingBuildListImplicitly_ThenAListOfUniqueEntitiesShouldBeReturned()
        {
            List <Customer> entities = BasicCustomerBuilder.CreateListOfSize(5);

            entities.ShouldBeUnique();
        }
Пример #12
0
        public void GivenAListBuilderProxyInstance_WhenCallingIsListBuilderProxy_ThenReturnTrue()
        {
            var builder = BasicCustomerBuilder.CreateListOfSize(1).TheFirst(1);

            builder.IsListBuilderProxy().ShouldBe(true);
        }