コード例 #1
0
        public void CompileAndCreateInstanceTestVB()
        {
            var target = CompilatorFactory.CreateCompiler(LanguageType.VisualBasic);

            target.AddReference("stardust.core.crosscuttingtest.dll");
            var expected = 666;             // TODO: Initialize to an appropriate value
            var actual   = target.CompileAndCreateInstance <IDynamicTestInterface>(VbCode);

            Assert.AreEqual(expected, actual.HelloWorld());
        }
コード例 #2
0
        public void CompileAndExecuteMethodTestVB()
        {
            var target = CompilatorFactory.CreateCompiler(LanguageType.VisualBasic);

            target.AddReference("stardust.core.crosscuttingtest.dll");
            var expected = 666;
            var actual   = target.CompileAndExecute(VbCode, "DynamicTestInterface.HelloWorld");

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void CompileAndCreateInstanceTestCS()
        {
            var target = CompilatorFactory.CreateCompiler(LanguageType.CSharp);

            target.AddReference("stardust.core.crosscuttingtest.dll");
            var expected = 666;
            var actual   = target.CompileAndCreateInstance <IDynamicTestInterface>(CsCode);

            Assert.AreEqual(expected, actual.HelloWorld());
        }