예제 #1
0
        public void Desktop_MakeEngineTest()
#endif
        {
            var engine = new ManticoreEngine();

            Assert.NotNull(engine);
            engine.Shutdown();
        }
예제 #2
0
        public void Desktop_LoadJsTest()
#endif
        {
            var engine = new ManticoreEngine();

            engine.LoadScript("{}", "index.js");
            engine.Shutdown();
        }
예제 #3
0
        public async Task Desktop_PluginTest()
#endif
        {
            var           engine  = new ManticoreEngine().Start();
            StringBuilder builder = new StringBuilder();

            engine.WillLoadPolyfill += (s, a) => builder.Append("willLoadPoly,");
            engine.DidLoadPolyfill  += (s, a) => builder.Append("didLoadPoly,");
            engine.WillLoadScript   += (s, a) => builder.Append("willLoadScript,").Append(a.Name).Append(',');
            engine.DidLoadScript    += (s, a) => builder.Append("didLoadScript,").Append(a.Name).Append(',');
            engine.LoadScript("{}", "testScript.js");
            Assert.Equal(builder.ToString(), "willLoadPoly,didLoadPoly,willLoadScript,testScript.js,didLoadScript,testScript.js,");
            engine.Shutdown();
        }