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) { LinkerMethodInfo linkerMethodInfo; try { linkerMethodInfo = Linker.GetMethodInfo(typeSystem, linker, unitTestInfo); } catch (Exception ex) { Console.WriteLine($"Error while resolving method '{unitTestInfo.FullMethodName}'"); throw; } var unitTest = new UnitTest(unitTestInfo, linkerMethodInfo); unitTest.SerializedUnitTest = SerializeUnitTestMessage(unitTest); unitTest.UnitTestID = id++; unitTests.Add(unitTest); } return(unitTests); }
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); }