internal Favorites(SqlPersistence persistence, Groups groups, StoredCredentials credentials, ConnectionManager connectionManager, FavoriteIcons favoriteIcons) { this.groups = groups; this.credentials = credentials; this.dispatcher = persistence.Dispatcher; this.connectionManager = connectionManager; this.favoriteIcons = new DbFavoriteImagesStore(this.dispatcher, favoriteIcons); this.batchActions = new FavoritesBatchActions(this, this.cache, persistence); }
/// <summary> /// Initializes data connectors on beginning of each test. /// </summary> protected void InitializeTestLab() { this.RemoveDatabaseFileReadOnly(); FilePersistedTestLab.SetDefaultFileLocations(); settings.PersistenceSecurity = new SqlPersistenceSecurity(); this.SetDeploymentDirConnectionString(); // first reset the database password, then continue with other initializations this.CheckDatabase = DatabaseConnections.CreateInstance(); this.CheckDatabase.UpdateMasterPassword(String.Empty); this.PrimaryPersistence = new SqlPersistence(); this.PrimaryPersistence.Initialize(); this.SecondaryPersistence = new SqlPersistence(); this.SecondaryPersistence.Initialize(); this.ClearTestLab(); // because of failed previous tests }