コード例 #1
0
 public void CompileFixture()
 {
     string source = MbUnit.Tests.Samples.SampleHelper.TestFixture();
     using (SourceTestDomain domain = new SourceTestDomain())
     {
         domain.Sources.Add(source);
         domain.SandBox = false;
         domain.Load();
         domain.TestEngine.RunPipes();
     }
 }
コード例 #2
0
        public void CompileFixture()
        {
            string source = SampleHelper.TestFixture();
            using (SourceTestDomain domain = new SourceTestDomain())
            {
                //define an assembly resolver routine in case the CLR cannot find our assemblies.
                AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolveHandler);

                domain.Sources.Add(source);
                domain.SandBox = false;
                domain.Load();
                domain.TestEngine.RunPipes();
            }
        }
コード例 #3
0
        public void CompileAndCountTests()
        {
            string source = MbUnit.Tests.Samples.SampleHelper.TestFixture();
            using (SourceTestDomain domain = new SourceTestDomain())
            {
                domain.Sources.Add(source);
                domain.SandBox = false;
                domain.Load();
                domain.TestEngine.RunPipes();

                ReportResult result = domain.TestEngine.Report.Result;
                Assert.AreEqual(4,result.Counter.RunCount);
                Assert.AreEqual(2, result.Counter.SuccessCount);
                Assert.AreEqual(1, result.Counter.IgnoreCount);
                Assert.AreEqual(1, result.Counter.FailureCount);
            }
        }
コード例 #4
0
        public void CompileAndCountTests()
        {
            string source = SampleHelper.TestFixture();
            using (SourceTestDomain domain = new SourceTestDomain())
            {
                //define an assembly resolver routine in case the CLR cannot find our assemblies.
                AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolveHandler);

                domain.Sources.Add(source);
                domain.SandBox = false;
                domain.Load();
                domain.TestEngine.RunPipes();

                ReportResult result = domain.TestEngine.Report.Result;
                Assert.AreEqual(4,result.Counter.RunCount);
                Assert.AreEqual(2, result.Counter.SuccessCount);
                Assert.AreEqual(1, result.Counter.IgnoreCount);
                Assert.AreEqual(1, result.Counter.FailureCount);
            }
        }