コード例 #1
0
        public void AppendPathToEngines_ValidPath_EngineHavePathAdded()
        {
            string path = Environment.CurrentDirectory;
            LanguageSettings ruby = Helper.CreateIronRubySettings();
            EngineCache cache = new EngineCache();
            cache.AppendPathToEngines(path);
            IEngine engine = cache.GetEngine(ruby, null);

            bool found = EngineHasPath(path, engine);

            Assert.IsTrue(found);
        }
コード例 #2
0
        public void AppendPathToEngines_ValidPath_2EnginesHavePathAdded()
        {
            string path = Environment.CurrentDirectory;
            LanguageSettings ruby = Helper.CreateIronRubySettings();
            LanguageSettings python = Helper.CreateIronPythonSettings();
            EngineCache cache = new EngineCache();
            cache.AppendPathToEngines(path);
            IEngine rubyEngine = cache.GetEngine(ruby, null);
            IEngine pythonEngine = cache.GetEngine(python, null);

            bool rubyFound = EngineHasPath(path, rubyEngine);

            bool pythonFound = EngineHasPath(path, pythonEngine);

            Assert.IsTrue(rubyFound);
            Assert.IsTrue(pythonFound);
        }