public void Test_AggregatedDataIntegrator_AddTaskToProcessList() { var integrator = new AggregatedDataIntegrator(); SiteModel siteModel = new SiteModel(/*"TestName", "TestDesc", */ Guid.NewGuid(), StorageMutability.Immutable, 1.0); IMachinesList machines = new MachinesList(); machines.Add(new Machine("TestName", "TestHardwareID", 0, 0, Guid.NewGuid(), 0, false)); ServerSubGridTree tree = new ServerSubGridTree(siteModel.ID, StorageMutability.Mutable); MachinesProductionEventLists events = new MachinesProductionEventLists(siteModel, 1); integrator.AddTaskToProcessList(siteModel, siteModel.ID, machines, tree, 0, events); Assert.Equal(1, integrator.CountOfTasksToProcess); Assert.True(integrator.CanAcceptMoreAggregatedCellPasses, "CanAcceptMoreAggregatedCellPasses is false"); }
private void Initialise() { ProcessedEpochCount = 0; ProcessedCellPassCount = 0; // Note: Intermediary TAG file processing contexts don't store their data to any persistence context // so the SiteModel constructed to contain the data processed from a TAG file does not need a // storage proxy assigned to it SiteModel = DIContext.Obtain <ISiteModelFactory>().NewSiteModel(StorageMutability.Mutable); SiteModelGridAggregator = new ServerSubGridTree(SiteModel.ID, StorageMutability.Mutable) { CellSize = SiteModel.CellSize }; MachinesTargetValueChangesAggregator = new MachinesProductionEventLists(SiteModel, 0); Machines = new MachinesList(); }