Exemple #1
0
        public ResultsFile RunAlone(string id, IEnumerable <string> dlls)
        {
#if x64
            if (!Environment.Is64BitProcess)
            {
                throw new Exception("This runner is expected to run 64bit");
            }
#endif

#if SILVERLIGHT
            var am = dlls.Select(Assembly.Load).ToList();
#else
            var am = dlls.Select(Assembly.LoadFile).ToList();
#endif

            var runner = Runner.Create(id, am);
            PrintOutAloneStart(id);
            var file = new ResultsFile();
            runner.RunAll(r =>
            {
                PrintOutAloneResults(r);
                file.Add(r);
            });
            PrintOutAloneEnd(id, file);
            return(file);
        }
Exemple #2
0
        static int Main(string[] args)
        {
            ConventionTestProcessor.CIResultOutput.Disable = true;

            var id = "net40-converage";


            var asms = new[]
            {
                Assembly.GetAssembly(typeof(BasicTests.Basic)),
                Assembly.GetAssembly(typeof(ConstraintsTests.Basic)),
                Assembly.GetAssembly(typeof(XunitTests.Basic)),
                Assembly.GetAssembly(typeof(NunitTests.Basic)),
                Assembly.GetAssembly(typeof(FsUnitTests.BasicTests)),
            };

            var runner = Runner.Create(id, asms);
            var file   = new ResultsFile();

            runner.RunAll(r =>
            {
                string js = r.ToItemJson();
                var r2    = Newtonsoft.Json.JsonConvert.DeserializeObject <Result>(js);
                file.Add(r2);
            });
            var result = file.ToListJson();

            return(ConventionTestProcessor.Program.VerifyJsonResults(new[] { result }));
        }