Esempio n. 1
0
        public void CanCompileEmptyScriptTwice()
        {
            var scriptApi = new ScriptApi();

            scriptApi.CompileWrappedScript <TestScriptArity4>("");
            scriptApi.CompileWrappedScript <TestScriptArity4>("");
        }
Esempio n. 2
0
        public void CanCompileEmptyScriptTwice()
        {
            var scriptApi = new ScriptApi();

            scriptApi.CompileWrappedScript<TestScriptArity4>("");
            scriptApi.CompileWrappedScript<TestScriptArity4>("");
        }
Esempio n. 3
0
        public void CanCompileTypedScript()
        {
            var factory = new ScriptApi();

            var script = factory.CompileWrappedScript<TestScript>("throw new Exception()");

            Assert.Throws<Exception>(script.Run);
        }
Esempio n. 4
0
        public void CanCompileTypedScript()
        {
            var factory = new ScriptApi();

            var script = factory.CompileWrappedScript <TestScript>("throw new Exception()");

            Assert.Throws <Exception>(script.Run);
        }
Esempio n. 5
0
        public void Wrapped()
        {
            var scriptApi     = new ScriptApi();
            var wrappedScript = scriptApi.CompileWrappedScript <HappyScript>("Mood(\"Happy!\")");

            string result = wrappedScript.Run();

            result.ShouldEqual("Happy!");
        }
Esempio n. 6
0
        public void Wrapped()
        {
            var scriptApi = new ScriptApi();
            var wrappedScript = scriptApi.CompileWrappedScript<HappyScript>("Mood(\"Happy!\")");

            string result = wrappedScript.Run();

            result.ShouldEqual("Happy!");
        }
Esempio n. 7
0
        public void SupportsGenericArity1()
        {
            var script = _scriptApi.CompileWrappedScript <TestScriptArity1>("throw new Exception()");

            Assert.Throws <Exception>(script.Run);
        }