コード例 #1
0
        private static List <TestEntry> BuildTestEntriesFrom(IEnumerable <TestDescriptor> tests)
        {
            var hash = new Dictionary <string, TestEntry>();

            foreach (var test in tests)
            {
                TestEntry entry;
                if (!hash.TryGetValue(test.GetKey(), out entry))
                {
                    entry = new TestEntry {
                        TestAssembly = test.Assembly, TestClass = test.Type, TestName = test.Target
                    };
                    hash.Add(test.GetKey(), entry);
                }
                entry.TestRunners.Add(test.TestRunner);
            }
            return(new List <TestEntry>(hash.Values));
        }
コード例 #2
0
 private static List<TestEntry> BuildTestEntriesFrom(IEnumerable<TestDescriptor> tests)
 {
     var hash = new Dictionary<string, TestEntry>();
     foreach(var test in tests)
     {
         TestEntry entry;
         if(!hash.TryGetValue(test.GetKey(), out entry))
         {
             entry = new TestEntry {TestAssembly = test.Assembly, TestClass = test.Type, TestName=test.Target};
             hash.Add(test.GetKey(), entry);
         }
         entry.TestRunners.Add(test.TestRunner);
     }
     return new List<TestEntry>(hash.Values);
 }
コード例 #3
0
 private static string getTestSignature(TestEntry t, TestRunner runner)
 {
     var test = t.TestClass.Replace("/", "+") + "." + t.TestName;
     if (runner == TestRunner.MSpec)
         test = t.TestName.Replace("/", "+");
     Logger.WriteDebug("Adding translated test " + test);
     return test;
 }