Пример #1
0
        private static List <UnitTest> PrepareUnitTest(List <UnitTestInfo> discoveredUnitTests, TypeSystem typeSystem, MosaLinker linker)
        {
            var unitTests = new List <UnitTest>(discoveredUnitTests.Count);

            int id = 0;

            foreach (var unitTestInfo in discoveredUnitTests)
            {
                var linkerMethodInfo = Linker.GetMethodInfo(typeSystem, linker, unitTestInfo);

                var unitTest = new UnitTest(unitTestInfo, linkerMethodInfo);

                unitTest.SerializedUnitTest = SerializeUnitTestMessage(unitTest);
                unitTest.UnitTestID         = id++;

                unitTests.Add(unitTest);
            }

            return(unitTests);
        }