public void ShouldBeAbleToConstructItems() { objectBuilder.BuilderSettings.Returns(builderSettings); objectBuilder.Construct(Arg.Any <int>()).Returns(new SimpleClass()); declaration = new GlobalDeclaration <SimpleClass>(listBuilderImpl, objectBuilder); declaration.Construct(); }
public void DeclarationShouldUseObjectBuilderToConstructItems() { { listBuilderImpl.BuilderSettings.Returns(new BuilderSettings()); objectBuilder.BuilderSettings.Returns(new BuilderSettings()); objectBuilder.Construct(Arg.Any <int>()).Returns(new SimpleClass()); } { declaration = new RangeDeclaration <SimpleClass>(listBuilderImpl, objectBuilder, 0, 9); declaration.Construct(); } }
public void AddToMaster_AddsEachItemToTheList() { var masterList = new MyClass[listSize]; objectBuilder.Construct(Arg.Any <int>()).Returns(new MyClass()); uniqueRandomGenerator.Next(start, end).Returns(0, 2, 4); declaration.Construct(); // Act declaration.AddToMaster(masterList); // Assert masterList[0].ShouldNotBeNull(); masterList[2].ShouldNotBeNull(); masterList[4].ShouldNotBeNull(); }