Beispiel #1
0
        public static OperationUnderTest CreateOperationUnderTest(
            string className  = "DefaultClassName",
            string methodName = "DefaultMethodName",
            params TestScenario[] testScenarios)
        {
            var operationUnderTest = new OperationUnderTest(className, methodName);

            testScenarios.ForEach(x => operationUnderTest.AddTestScenario(x));

            return(operationUnderTest);
        }
Beispiel #2
0
 internal static void AppendContentRow(
     this StringBuilder sb,
     ProjectInfo projectInfo,
     UnitUnderTest unitUnderTest,
     OperationUnderTest operationUnderTest,
     TestScenario testScenario,
     string separator,
     INameFormatter nameFormatter)
 {
     sb?.Append($"{nameFormatter.SpecialCasedWordToSentence(projectInfo.Name)}{separator}");
     sb?.Append($"{nameFormatter.SpecialCasedWordToSentence(unitUnderTest.Namespace)}{separator}");
     sb?.Append($"{nameFormatter.SpecialCasedWordToSentence(operationUnderTest.ClassName)}{separator}");
     sb?.AppendLine($"\"{nameFormatter.CreateTestScenarioDescription(testScenario.Name, operationUnderTest.ClassName)}\"");
 }