public override void Asserts(ITestContext testContext) { ProjectConfigItem newProjectConfig = _projectConfigsStorage.GetProjectConfigById(IntegrationTestsConsts.DummyProjectConfigValid.Id); Assert.That(newProjectConfig != null, $"{GetType().Name} >>> Could not find project with the new ProjectId."); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Description), newProjectConfig.Description, IntegrationTestsConsts.DummyProjectConfigValid.Description); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DBName), newProjectConfig.DBName, IntegrationTestsConsts.DummyProjectConfigValid.DBName); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Username), newProjectConfig.Username, IntegrationTestsConsts.DummyProjectConfigValid.Username); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Password), newProjectConfig.Password, IntegrationTestsConsts.DummyProjectConfigValid.Password); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DevEnvironment), newProjectConfig.DevEnvironment, true); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DevScriptsBaseFolderPath), newProjectConfig.DevScriptsBaseFolderPath, IntegrationTestsConsts.DummyProjectConfigValid.DevScriptsBaseFolderPath); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DeployArtifactFolderPath), newProjectConfig.DeployArtifactFolderPath, IntegrationTestsConsts.DummyProjectConfigValid.DeployArtifactFolderPath); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DBType), newProjectConfig.DBType, IntegrationTestsConsts.DummyProjectConfigValid.DBType); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Server), newProjectConfig.Server, IntegrationTestsConsts.DummyProjectConfigValid.Server); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.BackupFolderPath), newProjectConfig.BackupFolderPath, IntegrationTestsConsts.DummyProjectConfigValid.BackupFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.BackupFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.DevScriptsBaseFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.IncrementalScriptsFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.RepeatableScriptsFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.DevDummyDataScriptsFolderPath); _projectConfigsDirectoriesCleaner.AssertDirectoryExist(GetType().Name, IntegrationTestsConsts.DummyProjectConfigValid.DeployArtifactFolderPath); }
public override void Asserts(ITestContext testContext) { _processAsserts.AssertProccessValid(GetType().Name, testContext.ProcessResults.Trace); ProjectConfigItem newProjectConfig = _projectConfigsStorage.GetProjectConfigById(IntegrationTestsConsts.DummyProjectConfigValid.Id); Assert.That(newProjectConfig != null, $"{GetType().Name} >>> Could not find project with the new ProjectId."); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Description), newProjectConfig.Description, IntegrationTestsConsts.DummyProjectConfigValid.Description); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DBName), newProjectConfig.DBName, IntegrationTestsConsts.DummyProjectConfigValid.DBName); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Username), newProjectConfig.Username, IntegrationTestsConsts.DummyProjectConfigValid.Username); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Password), newProjectConfig.Password, IntegrationTestsConsts.DummyProjectConfigValid.Password); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DevEnvironment), newProjectConfig.DevEnvironment, false); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DeliveryArtifactFolderPath), newProjectConfig.DeliveryArtifactFolderPath, IntegrationTestsConsts.DummyProjectConfigValid.DeliveryArtifactFolderPath); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.DBType), newProjectConfig.DBType, IntegrationTestsConsts.DummyProjectConfigValid.DBType); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.Server), newProjectConfig.Server, IntegrationTestsConsts.DummyProjectConfigValid.Server); _properiesAsserts.AssertProperty(GetType().Name, nameof(newProjectConfig.BackupFolderPath), newProjectConfig.BackupFolderPath, IntegrationTestsConsts.DummyProjectConfigValid.BackupFolderPath); _projectConfigsDirectories.AssertDirectoryExist(GetType().Name, newProjectConfig.BackupFolderPath); _projectConfigsDirectories.AssertDirectoryExist(GetType().Name, newProjectConfig.DeliveryArtifactFolderPath); }
public void AssertDBVersionsViewStateCompleteSuccessfully(string testName, DBVersionsControls dbVersionsControls, bool isDevEnv) { _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnCreateNewDevDummyDataScriptFileEnabled), dbVersionsControls.BtnCreateNewDevDummyDataScriptFileEnabled, isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnCreateNewIncrementalScriptFileEnabled), dbVersionsControls.BtnCreateNewIncrementalScriptFileEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnCreateNewRepeatableScriptFileEnabled), dbVersionsControls.BtnCreateNewRepeatableScriptFileEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnDeployVisible), dbVersionsControls.BtnDeployVisible, isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnRecreateDBFromScratchMainVisible), dbVersionsControls.BtnRecreateDBFromScratchMainVisible, isDevEnv); // AssertUIControlPropertyState(testName, nameof(dbVersionsControls.BtnRecreateDBFromScratchSecondaryVisible), dbVersionsControls.BtnRecreateDBFromScratchSecondaryVisible, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.BtnRefreshEnable), dbVersionsControls.BtnRefreshEnable, true); // AssertUIControlPropertyState(testName, nameof(dbVersionsControls.BtnShowHistoricalBackupsEnabled), dbVersionsControls.BtnShowHistoricalBackupsEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.GridToSelectTargetStateEnabled), dbVersionsControls.GridToSelectTargetStateEnabled, false); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.IncrementalScriptsGridEnabled), dbVersionsControls.IncrementalScriptsGridEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.LblColorTargetStateCaptionVisible), dbVersionsControls.LblColorTargetStateCaptionVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.LblColorTargetStateSquareVisible), dbVersionsControls.LblColorTargetStateSquareVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.LblProjectNameText), dbVersionsControls.LblProjectNameText, $"{IntegrationTestsConsts.TestProjectId} - "); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlDevDummyDataFilesVisible), dbVersionsControls.PnlDevDummyDataFilesVisible, isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlMainActionsEnabled), dbVersionsControls.PnlMainActionsEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlMainActionsVisible), dbVersionsControls.PnlMainActionsVisible, true); // AssertUIControlPropertyState(testName, nameof(dbVersionsControls.PnlMissingSystemTablesEnabled), dbVersionsControls.PnlMissingSystemTablesEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlMissingSystemTablesVisible), dbVersionsControls.PnlMissingSystemTablesVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlRepeatableFilesVisible), dbVersionsControls.PnlRepeatableFilesVisible, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlRestoreDBErrorVisible), dbVersionsControls.PnlRestoreDBErrorVisible, false); //AssertUIControlPropertyState(testName, nameof(dbVersionsControls.PnlSetDBStateManuallyEnabled), dbVersionsControls.PnlSetDBStateManuallyEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlSetDBStateManuallyVisible), dbVersionsControls.PnlSetDBStateManuallyVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(dbVersionsControls.PnlSyncToSpecificStateVisible), dbVersionsControls.PnlSyncToSpecificStateVisible, false); }
public void AssertEditProjectViewStateNew(string testName, EditProjectControls editProjectControls, bool isDevEnv) { _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnNavToProcessEnabled), editProjectControls.BtnNavToProcessEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnSaveEnabled), editProjectControls.BtnSaveEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnEditIdEnabled), editProjectControls.BtnEditIdEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnEditIdVisible), editProjectControls.BtnEditIdVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnSaveIdEnabled), editProjectControls.BtnSaveIdEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnSaveIdVisible), editProjectControls.BtnSaveIdVisible, false); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnCancelEditIdVisible), editProjectControls.BtnCancelEditIdVisible, false); // _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.BtnCancelEditIdEnabled), editProjectControls.BtnCancelEditIdEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.PnlDevEnvFoldersFieldsVisible), editProjectControls.PnlDevEnvFoldersFieldsVisible, isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.PnlDevEnvDeplyFolderVisible), editProjectControls.PnlDevEnvDeplyFolderVisible, isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.PnlDelEnvFieldsVisible), editProjectControls.PnlDelEnvFieldsVisible, !isDevEnv); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.CboConncectionTypeEnabled), editProjectControls.CboConncectionTypeEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbServerEnabled), editProjectControls.TbServerEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbDBNameEnabled), editProjectControls.TbDBNameEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbUsernameEnabled), editProjectControls.TbUsernameEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbPasswordEnabled), editProjectControls.TbPasswordEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbConncetionTimeoutEnabled), editProjectControls.TbConncetionTimeoutEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbDevScriptsFolderPathEnabled), editProjectControls.TbDevScriptsFolderPathEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbDBBackupFolderEnabled), editProjectControls.TbDBBackupFolderEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbIdEnabled), editProjectControls.TbIdEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.RbDevEnvEnabled), editProjectControls.RbDevEnvEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.RbDelEnvEnabled), editProjectControls.RbDelEnvEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbDeployArtifactFolderPathEnabled), editProjectControls.TbDeployArtifactFolderPathEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbDeliveryArtifactFolderPathEnabled), editProjectControls.TbDeliveryArtifactFolderPathEnabled, true); _propertiesAsserts.AssertProperty(testName, nameof(editProjectControls.TbProjectDescriptionEnabled), editProjectControls.TbProjectDescriptionEnabled, true); }
public void AssertNotificationsViewModelCompleteSuccessfully(string testName, NotificationsViewModelData notificationsViewModelData) { _propertiesAsserts.AssertProperty(testName, nameof(notificationsViewModelData.NotificationStatus), notificationsViewModelData.NotificationStatus.ToString(), NotificationStatus.CompleteSuccessfully.ToString()); _propertiesAsserts.AssertProperty(testName, nameof(notificationsViewModelData.ProcessStatusMessage), notificationsViewModelData.ProcessStatusMessage, UITextResources.CompleteSuccessfullyMessage); _propertiesAsserts.AssertProperty(testName, nameof(notificationsViewModelData.StatusImageType), notificationsViewModelData.StatusImageType.ToString(), StatusImageType.Succeed.ToString()); }