public JishInterpreter(IEngine engine, JSConsole console, LoadedAssembliesBucket loadedAssemblies, EmbeddedResourcesUtils embeddedResourceLoader, AssemblyCommandLoader assemblyCommandsLoader, ICurrentContextAssemblies currentContextAssemblies) { Trace.Assert(engine != null); Trace.Assert(console != null); Trace.Assert(loadedAssemblies != null); Trace.Assert(embeddedResourceLoader != null); Trace.Assert(assemblyCommandsLoader != null); Trace.Assert(currentContextAssemblies != null); this.engine = engine; this.currentContextAssemblies = currentContextAssemblies; this.assemblyCommandsLoader = assemblyCommandsLoader; this.embeddedResourceLoader = embeddedResourceLoader; this.loadedAssemblies = loadedAssemblies; this.console = console; }
[SetUp] public virtual void SetUp() { StandardKernel kernel = new StandardKernel(); IEngine engine = new JSNetEngine(); kernel.Bind <IEngine>().ToConstant(engine); kernel.Bind <ICurrentContextAssemblies>().To <TestCurrentContextAssemblies>(); console = new TestingConsole(); LoadedAssembliesBucket bucket = new LoadedAssembliesBucket(kernel.Get <HelpMgr>(), kernel, console); kernel.Bind <LoadedAssembliesBucket>().ToConstant(bucket); engine.SetGlobal("console", console); kernel.Bind <JSConsole>().ToConstant(console); kernel.Bind <IJishInterpreter>().To <JishInterpreter>().InSingletonScope(); jish = kernel.Get <IJishInterpreter>(); ((JishInterpreter)jish).ThrowErrors = true; }