public GaugingSummary Assemble(PocketGaugerFiles pocketGaugerFiles) { var gaugingSummary = _gaugingSummaryParser.Parse(pocketGaugerFiles); AttachMeterDetails(gaugingSummary, pocketGaugerFiles); AttachPanelItems(gaugingSummary, pocketGaugerFiles); return(gaugingSummary); }
private void SetUpGaugingSummaryParser() { _gaugingSummaryParser = Substitute.For <IGaugingSummaryParser>(); var gaugingSummaryItems = _fixture.Build <GaugingSummaryItem>() .Without(g => g.MeterDetailsItem) .Without(g => g.PanelItems) .CreateMany(3) .ToList(); for (var i = 0; i < gaugingSummaryItems.Count; i++) { gaugingSummaryItems[i].MeterId = _meterIds[i]; } var gaugingSummary = new GaugingSummary { GaugingSummaryItems = gaugingSummaryItems }; _gaugingSummaryParser.Parse(Arg.Any <PocketGaugerFiles>()).Returns(gaugingSummary); }