/// <summary> /// The helper stf test Utilities. /// </summary> /// <param name="testStepDescription"> /// The testStepDescription. /// </param> /// <param name="testCaseId"> /// The test Case Id. /// </param> /// <param name="expected"> /// The expected. /// </param> private void HelperStfTestUtils(string testStepDescription, int testCaseId, int expected) { var stfTestUtils = new StfTestUtils(testCaseId); var newRootFolderPath = stfTestUtils.TestCaseDirectory; var stfTestUtils2 = new StfTestUtils(testCaseId, newRootFolderPath); var actual = stfTestUtils2.GetTestCaseFolderPathsFromCache(); StfAssert.AreEqual(testStepDescription, expected, actual.Length); }
public void TestReadKeyValuePairsFromFileWithDifferentAssignmentOperator() { StfLogger.Configuration.ScreenshotOnLogFail = false; stfTestUtils = new StfTestUtils(6002); stfTestUtils.TestCaseFileAndFolderUtils.SetupTempAndResultsFolders(); // AssignmentOperator BECOMES HelperReadKeyValuePairsFromFile("AssignmentOperator BECOMES", "SimpleAssignmentOperatorBECOMES.txt", "BECOMES"); }
public void TestGetCleanFileContent() { stfTestUtils = new StfTestUtils(4501); stfTestUtils.TestCaseFileAndFolderUtils.SetupTempAndResultsFolders(); HelperGetCleanFileContentNoReferenceFiles("path is null", null); HelperGetCleanFileContentNoReferenceFiles("path is empty", string.Empty); HelperGetCleanFileContent("File With Header", "FileWithComments.txt"); HelperGetCleanFileContent("File With no Header", "FileWithCommentsNoHeader.txt"); }
public void TestReadKeyValuePairsFromFile() { StfLogger.Configuration.ScreenshotOnLogFail = false; stfTestUtils = new StfTestUtils(6001); stfTestUtils.TestCaseFileAndFolderUtils.SetupTempAndResultsFolders(); // keyName Case Ignore Case HelperReadKeyValuePairsFromFile("File With two simple assignments", "Simple.txt"); HelperReadKeyValuePairsFromFile("File With two duplicate key assignments", "DuplicateKeys - CaseSignificant.txt", keyNameIgnoreCase: false); // keyName Case Significant HelperReadKeyValuePairsFromFile("File With two simple assignments", "Simple.txt", keyNameIgnoreCase: false); HelperReadKeyValuePairsFromFile("File With two duplicate key assignments", "DuplicateKeys - IgnoreCase.txt"); }
public void TestInitialize() { StfTestUtils = new StfTestUtils(4501); }
/// <summary> /// Initializes a new instance of the <see cref="UnitTestScriptBase"/> class. /// </summary> /// <param name="testCaseId"> /// The test case id. /// </param> /// <param name="rootFolder"> /// The root folder. /// </param> public UnitTestScriptBase(int testCaseId, string rootFolder) { StfTestUtils = new StfTestUtils(testCaseId, rootFolder); }