public void DecisionTreeController_ConstructorInjection_ShouldPass()
        {
            IDecisionTreeRepository decisionTreeRepository = new InMemoryDecisionTreeRepository();
            var controller = new DecisionTreeController(decisionTreeRepository);

            Assert.Pass();
        }
Пример #2
0
    void Awake()
    {
        // Load the decision tree
        decisionTreeController = FindObjectOfType <DecisionTreeController>();
        if (decisionTreeController != null)
        {
            var path = decisionTreeController.pathDecisionXMLFile;
            decisionTree = DecisionTree.Load(path);
        }
        else
        {
            Debug.LogWarning("Scenario controller could not get the Decision Tree Controller");
        }

        // Get the traffic DB
        TrafficIntegrationController tic = FindObjectOfType <TrafficIntegrationController>();

        if (tic != null)
        {
            if (tic.typeOfIntegration == TrafficIntegrationController.TypeOfIntegration.DecisionTreeIntegration)
            {
                trafficDB = FindObjectOfType <TrafficIntegrationData>();

                if (trafficDB == null)
                {
                    Debug.LogWarning("Scenario controller could not get the Traffic Integration Data");
                }
            }
            else
            {
                Debug.LogWarning("Traffic Integration Controller not set for using decision tree integration");
            }
        }

        // Get the DecisionUIController
        decisionUI = FindObjectOfType <DecisionUIController>();

        // Get the TimeController
        timeController = FindObjectOfType <TimeController>();
    }
Пример #3
0
        public DecisionTreeControllerTest()
        {
            IDecisionTreeProvider provider = new DecisionTreeProvider();

            _controller = new DecisionTreeController(provider);
        }