Пример #1
0
        public static string RenderToText(ReportResult result, string outputPath, string transform, string nameFormat)
        {
            if (result == null)
            {
                throw new ArgumentNullException("result");
            }
            if (nameFormat == null)
            {
                throw new ArgumentNullException("nameFormat");
            }
            if (nameFormat.Length == 0)
            {
                throw new ArgumentException("Length is zero", "nameFormat");
            }

            TextReport textReport = new TextReport();

            if (transform != null)
            {
                if (!File.Exists(transform))
                {
                    throw new ArgumentException("Transform does not exist.", "transform");
                }
                XslTransform xsl = new XslTransform();
                xsl.Load(transform);
                textReport.Transform = xsl;
            }
            return(textReport.Render(result, outputPath, nameFormat));
        }
Пример #2
0
        public static string RenderToText(ReportResult result, string outputPath, string transform, string nameFormat)
        {
            if (result == null)
                throw new ArgumentNullException("result");
            if (nameFormat == null)
                throw new ArgumentNullException("nameFormat");
            if (nameFormat.Length == 0)
                throw new ArgumentException("Length is zero", "nameFormat");

            TextReport textReport = new TextReport();
            if (transform != null)
            {
                if (!File.Exists(transform))
                    throw new ArgumentException("Transform does not exist.", "transform");
                XslTransform xsl = new XslTransform();
                xsl.Load(transform);
                textReport.Transform = xsl;
            }
            return textReport.Render(result, outputPath, nameFormat);
        }
Пример #3
0
        public void LoadAndRunFixtures()
        {
            this.CreateAssembly();

            // load assembly
            using(TestDomain domain = new TestDomain(this.compiler.Parameters.OutputAssembly))
            {
                domain.ShadowCopyFiles = false;
                domain.InitializeEngine();
                foreach (string dir in this.Compiler.Parameters.ReferencedAssemblies)
                    domain.TestEngine.AddHintDirectory(dir);
                domain.PopulateEngine();
                Console.WriteLine("Domain loaded");
                Console.WriteLine("Tree populated, {0} tests", domain.TestEngine.GetTestCount());
                // Assert.AreEqual(1, domain.TestTree.GetTestCount());
                // domain.TestTree.Success+=new MbUnit.Core.RunSuccessEventHandler(TestTree_Success);
                // running tests
                domain.TestEngine.RunPipes();

                // display report
                TextReport report = new TextReport();
                result = domain.TestEngine.Report.Result;
                report.Render(result,Console.Out);
                counter = domain.TestEngine.GetTestCount();
            }
        }
Пример #4
0
        public static string RenderToText(ReportResult result)
        {
            TextReport textReport = new TextReport();

            return(textReport.Render(result));
        }
Пример #5
0
		public static string RenderToText(ReportResult result)
		{
			TextReport textReport = new TextReport();
			return textReport.Render(result);
		}