public ProjectInfo TryExtractProjectInfo() { var projectInfo = new ProjectInfo(TestAssemblyInfo.AssemblyName); foreach (var publicClass in GetPublicClassesInTestAssembly()) { var unitUnderTest = projectInfo.GetOrCreateUnitUnderTest(publicClass); foreach (var method in publicClass.GetMethods()) { var operationUnderTest = new OperationUnderTest(publicClass.Name, method.Name); var testScenarios = ExtractScenarios(method); operationUnderTest.AddTestScenarios(testScenarios); unitUnderTest.AddOperationUnderTest(operationUnderTest); } } projectInfo.Compress(); if (projectInfo.HasInformation) { return(projectInfo); } return(null); }
public void AddOperationUnderTest(OperationUnderTest operationUnderTest) => _operationsUnderTest.AddIfNotNull(operationUnderTest);