public override ITestContext Arrange(TestArgs testArgs) { ProjectConfigItem projectConfig = new ProjectConfigItem() { Id = IntegrationTestsConsts.DummyProjectConfigValid.Id, Description = IntegrationTestsConsts.DummyProjectConfigValid.Description, DBType = IntegrationTestsConsts.DummyProjectConfigValid.DBType, Server = IntegrationTestsConsts.DummyProjectConfigValid.Server, DBName = IntegrationTestsConsts.DummyProjectConfigValid.DBName, Username = IntegrationTestsConsts.DummyProjectConfigValid.Username, Password = IntegrationTestsConsts.DummyProjectConfigValid.Password, BackupFolderPath = IntegrationTestsConsts.DummyProjectConfigValid.BackupFolderPath, DevEnvironment = false, DevScriptsBaseFolderPath = IntegrationTestsConsts.DummyProjectConfigValid.DevScriptsBaseFolderPath, DeployArtifactFolderPath = IntegrationTestsConsts.DummyProjectConfigValid.DeployArtifactFolderPath, DeliveryArtifactFolderPath = IntegrationTestsConsts.DummyProjectConfigValid.DeliveryArtifactFolderPath, }; _projectConfigsStorageHelper.PrepareTestProject(projectConfig); ProjectConfigTestArgs overrideTestArgs = new ProjectConfigTestArgs(projectConfig); return(new ProcessTestContext(overrideTestArgs)); }
public override ITestContext Arrange(TestArgs testArgs) { ProjectConfigItem projectConfig = new ProjectConfigItem() { Id = IntegrationTestsConsts.TestProjectId, }; _projectConfigsStorageHelper.PrepareTestProject(projectConfig); ProjectConfigTestArgs overrideTestArgs = new ProjectConfigTestArgs(projectConfig); return(new ProcessTestContext(overrideTestArgs)); }
public override ITestContext Arrange(TestArgs testArgs) { ProjectConfigItem projectConfig = new ProjectConfigItem() { Id = IntegrationTestsConsts.TestProjectId, DevEnvironment = false, }; ProjectConfigTestArgs overrideTestArgs = new ProjectConfigTestArgs(projectConfig); ITestContext testContext = new ProcessTestContext(overrideTestArgs as ProjectConfigTestArgs, DBBackupFileType.None, ScriptFilesStateType.None); _projectConfigsStorageHelper.PrepareTestProject(testContext.ProjectConfig); return(testContext); }
public override ITestContext Arrange(TestArgs testArgs) { ProjectConfigItem projectConfig = IntegrationTestsConsts.GetNewInstanceForDummyProjectConfigValid(); projectConfig.DevScriptsBaseFolderPath = FileSystemPathUtils.ParsePathVaribles(IntegrationTestsConsts.DevScriptsBaseFolderPath_Normal).Replace("[DBType]", IntegrationTestsConsts.SqlServerDBType); projectConfig.Id = OldProjectId; projectConfig.Description = ProjectDesc; _projectConfigsStorageHelper.PrepareTestProject(projectConfig); ProjectConfigTestArgs projectConfigTestArgs = new ProjectConfigTestArgs(projectConfig); _dbHandler.RestoreDB(projectConfig.DBConnectionInfo, DBBackupFileType.EmptyDB); return(new ProcessTestContext(projectConfigTestArgs)); }
public override ITestContext Arrange(TestArgs testArgs) { ITestContext testContext = _projectConfigWithDBArrangeAndAssert.Arrange(testArgs, false, DBBackupFileType.FinalState_DeliveryEnv, ScriptFilesStateType.ValidScripts); testContext.ProjectConfig.DeliveryArtifactFolderPath += "_NotExistFolderSuffix"; if (Directory.Exists(testContext.ProjectConfig.DeliveryArtifactFolderPath)) { Directory.Delete(testContext.ProjectConfig.DeliveryArtifactFolderPath); } _projectConfigsStorageHelper.PrepareTestProject(testContext.ProjectConfig); return(testContext); }
public override ITestContext Arrange(TestArgs testArgs) { _projectConfigsDirectoriesCleaner.ClearAutoCreatedFolders(); ProjectConfigItem projectConfig = new ProjectConfigItem() { Id = IntegrationTestsConsts.DummyProjectConfigValid.Id, DevEnvironment = true }; _projectConfigsStorageHelper.PrepareTestProject(projectConfig); ProjectConfigTestArgs overrideTestArgs = new ProjectConfigTestArgs(projectConfig); _dbHandler.RestoreDB(IntegrationTestsConsts.DummyProjectConfigValid.DBConnectionInfo, DBBackupFileType.EmptyDB); return(new ProcessTestContext(overrideTestArgs)); }
public override ITestContext Arrange(TestArgs testArgs) { ProjectConfigItem projectConfig1 = new ProjectConfigItem() { Id = _testProjectId1, Description = _testProjectDesc1, }; ProjectConfigItem projectConfig2 = new ProjectConfigItem() { Id = _testProjectId2, Description = _testProjectDesc2, }; _projectConfigsStorageHelper.PrepareTestProject(projectConfig1, projectConfig2); return(new ProcessTestContext(testArgs)); }
public ITestContext Arrange(TestArgs testArgs, bool devEnvironment, DBBackupFileType dbBackupFileType, ScriptFilesStateType scriptFilesStateType) { ITestContext testContext = new ProcessTestContext(testArgs as ProjectConfigTestArgs, dbBackupFileType, scriptFilesStateType); testContext.ProjectConfig.DevEnvironment = devEnvironment; ProjectConfigItem projectConfig = testContext.ProjectConfig; _projectConfigsFactory.SetFoldersPathByDBType(ref projectConfig, testContext.ScriptFilesStateType); _projectConfigsStorageHelper.PrepareTestProject(testContext.ProjectConfig); if (testContext.DBBackupFileType != DBBackupFileType.None) { _dbHandler.RestoreDB(testContext.ProjectConfig.DBConnectionInfo, dbBackupFileType); testContext.NumOfConnectionsBefore = _dbHandler.GetNumOfOpenConnection(testContext.ProjectConfig.DBConnectionInfo); } _foldersUtils.RemoveArtifactTempFolder(testContext.ProjectConfig); return(testContext); }