Beispiel #1
0
        public void ExecuteCompletePlanTriggersCallbackAtTerminalState()
        {
            // Force terminal evaluation.
            m_Scheduler.Dispose();
            m_Scheduler = new KeyDomainScheduler();
            m_Scheduler.Initialize(m_StateManager, terminationEvaluator: new TestManualOverrideTerminationEvaluator <StateData> {
                TerminationReturnValue = true
            });

            // Initiate query
            var query = m_Scheduler.RequestPlan(KeyDomainUtility.InitialStateKey).PlanUntil(maximumUpdates: 1);

            // Schedule single iteration
            m_Scheduler.Schedule(default);
        public void CallbackInvokedAndQueryStatusIsCompleteAfterPlanComplete()
        {
            // Force terminal evaluation.
            m_Scheduler.Dispose();
            m_Scheduler = new KeyDomainScheduler();
            m_Scheduler.Initialize(m_StateManager, terminationEvaluator: new TestManualOverrideTerminationEvaluator <StateData> {
                TerminationReturnValue = true
            });

            bool complete = false;
            var  query    = m_Scheduler.RequestPlan(KeyDomainUtility.InitialStateKey, plan => { complete = true; });

            for (int i = 0; i < 3 && !complete; i++)
            {
                m_Scheduler.Schedule(default);