public void Construct_ConstructsEachItem() { // Act declaration.Construct(); // Assert objectBuilder.Received().Construct(Arg.Any <int>()); }
public void ShouldCallFunctionsOnItemsInTheMasterList() { IList <SimpleClass> masterList = Substitute.For <IList <SimpleClass> >(); { masterList[4].Returns((SimpleClass)null); masterList[5].Returns((SimpleClass)null); } { declaration = new RangeDeclaration <SimpleClass>(listBuilderImpl, objectBuilder, 9, 11); declaration.MasterListAffectedIndexes = new List <int> { 4, 5 }; declaration.CallFunctions(masterList); } objectBuilder.Received().CallFunctions(null, 0); }