public CoreProxy(ICoreController controller, IModelUpdater modelUpdater) { m_controller = controller; ModelUpdater = modelUpdater; m_controller.StartStateChecking(HandleKeepaliveStateResponse); modelUpdater.Start(); }
public void GetsModelSeveralTimes() { m_modelUpdater.Start(); // There is an "initial" empty model. Assert.NotNull(m_modelUpdater.GetNewModel()); for (int i = 0; i < 5; i++) { // Now that the first model was taken, there is no other to be had. Assert.Null(m_modelUpdater.GetNewModel()); WaitAndGetNewModel(); // Repeat several times to see that the dynamics work repeatedly. } // A new model was not allowed to be requested, so there is no update. Assert.Null(m_modelUpdater.GetNewModel()); m_modelUpdater.Stop(); }