コード例 #1
0
ファイル: MSpec.cs プロジェクト: DuncanButler/nTestRunner
 public void Add(Assembly assembly)
 {
     Assembly.Add(assembly);
 }
コード例 #2
0
 int GetAssemblySpecificationCount(Assembly assembly)
 {
     return assembly.Concern.SelectMany(concern => concern.Context).Sum(
         context => (from spec in context.Specification select spec).Count());
 }
コード例 #3
0
 int GetAssemblySpecificationFailures(Assembly assembly)
 {
     return assembly.Concern.Sum(concern => GetConsernSpecificationFailures(concern));
 }
コード例 #4
0
        void BuildTestSuiteNameSpaceNodes(string testRunTime, Results assemblyResults, Assembly assembly)
        {
            foreach (var concern in assembly.Concern)
            {

                var concernSuite = new TestSuite {TestSuiteType = "NameSpace", Name = concern.Name, Executed = true};

                if (GetConsernSpecificationFailures(concern) == 0)
                {
                    concernSuite.Result = "Success";
                    concernSuite.Success = true;
                }
                else
                {
                    concernSuite.Result = "Failure";
                    concernSuite.Success = false;
                }

                concernSuite.Time = testRunTime;

                assemblyResults.TestSuite = concernSuite;

                var concernResults = new Results();
                concernSuite.Results = concernResults;

                BuildTestSuiteTestFixtureNodes(testRunTime, concernResults, concern);
            }
        }