public void GivenListOfBuilders_WhenCallingBuildList_ThenAListOfUniqueEntitiesShouldBeReturned() { var builders = BasicCustomerBuilder.CreateListOfSize(5); var entities = builders.BuildList <Customer, BasicCustomerBuilder>(); Assert.That(entities, Is.Unique); }
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>()); }
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>()); }
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)); }
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()); }
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]); }
public void GivenListOfBuilders_WhenCallingBuildListImplicitly_ThenAListOfUniqueEntitiesShouldBeReturned() { List <Customer> entities = BasicCustomerBuilder.CreateListOfSize(5); entities.ShouldBeUnique(); }
public void GivenAListBuilderProxyInstance_WhenCallingIsListBuilderProxy_ThenReturnTrue() { var builder = BasicCustomerBuilder.CreateListOfSize(1).TheFirst(1); builder.IsListBuilderProxy().ShouldBe(true); }