/// <summary> /// The helper test file paths all steps. /// </summary> /// <param name="testCaseName"> /// The test case name. /// </param> /// <param name="testCaseId"> /// The test case id. /// </param> /// <param name="fileNameFilters"> /// The file name filters. /// </param> /// <param name="numSteps"> /// The num steps. /// </param> /// <param name="expectedFilePaths"> /// The expected file paths. /// </param> private void HelperTestFilePathsAllSteps( string testCaseName, int testCaseId, string[] fileNameFilters, int numSteps, string[,] expectedFilePaths) { StfLogger.LogHeader(testCaseName); var testCaseFileAndFolderUtils = new TestCaseFileAndFolderUtils(testCaseId, UnitTestTestDataRoot); var testCaseStepFilePathUtils = new TestCaseStepFilePathUtils( testCaseFileAndFolderUtils.TestCaseDirectory, fileNameFilters, true); for (int stepNum = 1; stepNum <= numSteps; stepNum++) { StfLogger.LogSubHeader($"Step {stepNum}"); for (var fileNameFilterNo = 0; fileNameFilterNo < fileNameFilters.Length; fileNameFilterNo++) { var actual = testCaseStepFilePathUtils.GetFileNameForStep(fileNameFilters[fileNameFilterNo], stepNum); StfAssert.AreEqual( "FileNames for step are equal", expectedFilePaths[stepNum - 1, fileNameFilterNo], actual); } } }
/// <summary> /// The helper file paths. /// </summary> /// <param name="testStep"> /// The test step. /// </param> /// <param name="testCaseId"> /// The test case id. /// </param> /// <param name="fileNameFilter"> /// The file name filter. /// </param> /// <param name="step"> /// The step. /// </param> /// <param name="expectedFilePath"> /// The expected file path. /// </param> private void HelperFilePaths( string testStep, int testCaseId, string fileNameFilter, int step, string expectedFilePath) { StfLogger.LogSubHeader(testStep); var testCaseFileAndFolderUtils = new TestCaseFileAndFolderUtils(testCaseId, UnitTestTestDataRoot); var fileNameFilters = new[] { "Template.txt", "Config.txt" }; var testCaseStepFilePathUtils = new TestCaseStepFilePathUtils(testCaseFileAndFolderUtils.TestCaseDirectory, fileNameFilters); var actual = testCaseStepFilePathUtils.GetFileNameForStep(fileNameFilter, step); StfAssert.AreEqual(testStep, expectedFilePath, actual); }