/// <summary> /// Tests the module configuration. /// </summary> private TestModuleConfig BuildTestModuleConfig() { var testModuleConfig = new TestModuleConfig(); testModuleConfig.ModuleId = _formModel.form.Name; testModuleConfig.ModuleName = _formModel.form.Header; testModuleConfig.PrimaryKeyColumnName = _formModel.form.PrimaryKeyName; testModuleConfig.TableName = _formModel.form.TableName; testModuleConfig.TemplatePath = AppConfig.TemplatePath; testModuleConfig.IncludeNegativeTestCase = chkIncludeNegativeTestCase.Checked; testModuleConfig.IncludeSecurityTestCase = chkIncludeSecurityTestCase.Checked; testModuleConfig.VerifyInEditMode = chkIncludeEditModeValidation.Checked; testModuleConfig.VerifyInViewMode = chkIncludeViewModeValidation.Checked; testModuleConfig.AutomationGuidFieldName = cmbAutomationGuidField.SelectedValue.ToString(); testModuleConfig.Credentials = new TestBuildCredentials(); testModuleConfig.Credentials.ConnectionString = txtConnectionString.Text; testModuleConfig.Credentials.Username = txtMasterworksUserName.Text; testModuleConfig.Credentials.Password = txtMasterworksPassword.Text; testModuleConfig.Credentials.URL = txtMasterworksUrl.Text; testModuleConfig.SolutionConfig = new SolutionGenerationConfig(); testModuleConfig.SolutionConfig.IsAutoGenerateSolutionName = chkAutoGenerateSolutionName.Checked; testModuleConfig.SolutionConfig.IsGeneratedDistinctSuiteXmlConfig = chkGenerateDistinctSuiteXmlConfig.Checked; testModuleConfig.SolutionConfig.IsGeneratedDistinctDLL = chkGenerateDistinctDLL.Checked; testModuleConfig.SolutionConfig.SolutionName = txtSolutionName.Text; //testModuleConfig.SolutionConfig.SolutionTargetPath = txtSolutionTargetPath.Text; //testModuleConfig.SolutionConfig.IsCompileAndGenerateLibrary = chkCompileAndGenerateLibrary.Checked; return(testModuleConfig); }
public void FourControls() { List <ScenarioDTO> expected_scenarios = new List <ScenarioDTO>(); List <TestCaseComponentGroup> groups = BuildData_FourControls(ref expected_scenarios); var testModuleConfig = new TestModuleConfig(); ScenarioBuilder builder = new ScenarioBuilder(groups, testModuleConfig); List <ScenarioDTO> actual_scenarios = builder.Build(); CollectionAssert.AreEqual(expected_scenarios, actual_scenarios, new TestCaseScenarioComparer()); }
static void Main(string[] args) { TestModuleConfig tc = new TestModuleConfig() { ModuleId = "CONTDWR", ModuleName = "Daily Progress Report", TableName = "DPRTable", PrimaryKeyColumnName = "ID", }; var template = new TCMainClassTemplate(); template.Session = new Dictionary <string, object>() { { "TestModuleConfig", tc }, }; template.Initialize(); Console.WriteLine(template.TransformText()); }
/// <summary> /// Initializes a new instance of the <see cref="ScenarioBuilder"/> class. /// </summary> /// <param name="testCaseGroups">The test case groups.</param> /// <param name="testModuleConfig">The test module configuration.</param> public ScenarioBuilder(List <TestCaseComponentGroup> testCaseGroups, TestModuleConfig testModuleConfig) : this() { TestCaseGroups = testCaseGroups; _testModuleConfig = testModuleConfig; }
public TestCaseMainCSharpFileGenerator(TestModuleConfig tcMainClassObject) { this.TemplateDataObject = tcMainClassObject; }
private void Create_TestCaseMainFile_InsideAutoGenTests(TestModuleConfig moduleConfig) { TestCaseMainCSharpFileGenerator csFile = new TestCaseMainCSharpFileGenerator(moduleConfig); csFile.GenerateFile(Path.Combine(this._SolutionContentFolderFullPath, CONST_FOLDER_AutoGenTests)); }
/// <summary> /// Initializes a new instance of the <see cref="TestCaseComponentBuilder"/> class. /// </summary> /// <param name="testComponents">The test components.</param> public TestCaseComponentBuilder(List <TestComponent> testComponents, TestModuleConfig testModuleConfig) { _testCaseComponents = testComponents; _testModuleConfig = testModuleConfig; }
public TestCaseScenarioCSharpFileGenerator(TestModuleConfig tcMainClassObjectRef, ScenarioDTO scenarioObj) { this.TemplateDataObject = scenarioObj; this.TestCaseMainClassObjectRef = tcMainClassObjectRef; }