public void Setup() { _log = new Mock <ILog>(); _settings = new Mock <IReadonlyRuntimeSettings>(); _settings.Setup(x => x.SourceDirectory).Returns(FsPath.Empty); _sut = new CsharpScriptHandler(_log.Object); _sut.SetHostFromRuntimeSettings(_settings.Object); _loaded = _sut.LoadScripts(new FsPath(TestEnvironment.GetTestFolder())); }
private bool LoadAndCompileScripts() { if (_configuration == null) { return(false); } if (string.IsNullOrEmpty(_configuration.ScriptsDirectory)) { return(true); } Log.Info("Trying to load and compile script files..."); FsPath scripts = new FsPath(WorkDirectory).Combine(_configuration.ScriptsDirectory); int count = _scriptHandler.LoadScripts(scripts); Log.Info("Loaded {0} instances from script files", count); return(true); }