public void TestInitialize() { _fixture = new Fixture(); _awbRepository = new Mock <IAwbRepository>(MockBehavior.Strict); _awbIds = Enumerable.Range(0, AWBCount).Select(x => (long)x).ToArray(); _awbsData = _awbIds.Select(i => _fixture.Build <AirWaybillData>() .With(d => d.Id, i) .Create()).ToArray(); _awbRepository.Setup(x => x.Get(_awbIds)).Returns(_awbsData); _applications = _fixture.CreateMany <ApplicationListItem>(AppCount).ToArray(); for (var i = 0; i < AppCount; i++) { var item = _applications[i]; item.AirWaybillId = i % AWBCount; item.Id = i; item.ClientNic = "Client " + i % ClientCount; item.Count = i; item.Weight = i; item.Value = i; item.Volume = i; } _grouper = new ApplicationGrouper(_awbRepository.Object); }
public void TestInitialize() { _fixture = new Fixture(); _awbRepository = new Mock<IAwbRepository>(MockBehavior.Strict); _awbIds = Enumerable.Range(0, AWBCount).Select(x => (long)x).ToArray(); _awbsData = _awbIds.Select(i => _fixture.Build<AirWaybillData>() .With(d => d.Id, i) .Create()).ToArray(); _awbRepository.Setup(x => x.Get(_awbIds)).Returns(_awbsData); _applications = _fixture.CreateMany<ApplicationListItem>(AppCount).ToArray(); for(var i = 0; i < AppCount; i++) { var item = _applications[i]; item.AirWaybillId = i % AWBCount; item.Id = i; item.ClientNic = "Client " + i % ClientCount; item.Count = i; item.Weight = i; item.Value = i; item.Volume = i; } _grouper = new ApplicationGrouper(_awbRepository.Object); }