示例#1
0
        private void ConfigureSettings()
        {
            FilePersistedTestLab.SetDefaultFileLocations();
            var settings = Settings.Instance;

            settings.CaptureRoot           = this.TestContext.TestDeploymentDir;
            settings.EnableCaptureToFolder = true;
        }
示例#2
0
        public void ConfigureTestLab()
        {
            FilePersistedTestLab.SetDefaultFileLocations();

            if (File.Exists(FileLocations.LastUpdateCheck))
            {
                File.Delete(FileLocations.LastUpdateCheck);
            }
        }
        private IPersistence RunUpgrade()
        {
            var connectionManager = TestConnectionManager.Instance;
            var persistence       = FilePersistedTestLab.CreateNotInitializedFilePersistence(new TestFileWatch(), connectionManager);
            var contentUpgrade    = new FilesV2ContentUpgrade(persistence, connectionManager, GetMasterPassword);

            contentUpgrade.Run();
            settings.ForceReload(); // because we changed its file, while upgrading
            return(persistence);
        }
示例#4
0
        public void OnlyDefaultPassword_ResolveCredentials_ReturnsDefaultPassword()
        {
            FilePersistedTestLab.SetDefaultFileLocations();
            Settings.Instance.DefaultPassword = PASSWORD;
            IGuardedSecurity result  = this.ResolveCredentials(original);
            const string     MESSAGE = "If no values are defined in stored password or credentials, they are resolved from default settings.";

            Settings.Instance.DefaultPassword = string.Empty;
            Assert.AreEqual(PASSWORD, result.Password, MESSAGE);
        }
示例#5
0
 public void TestInitialize()
 {
     FilePersistedTestLab.SetDefaultFileLocations();
     this.settings = Settings.Instance;
     this.settings.PersistenceType = FilePersistence.TYPE_ID;
     this.passwordRequested        = false;
     this.exitCalled           = false;
     this.fallbackRequested    = false;
     this.authenticationPrompt = new AuthenticationPrompt();
     this.factory = new PersistenceFactory(Settings.Instance, TestConnectionManager.Instance, TestConnectionManager.CreateTestFavoriteIcons());
 }
示例#6
0
        /// <summary>
        /// Initializes data connectors on beginning of each test.
        /// </summary>
        protected void InitializeTestLab()
        {
            this.RemoveDatabaseFileReadOnly();
            FilePersistedTestLab.SetDefaultFileLocations();
            this.SetDeploymentDirConnectionString();

            // first reset the database password, then continue with other initializations
            this.CheckDatabase = DatabaseConnections.CreateInstance();
            this.CheckDatabase.UpdateMasterPassword(String.Empty);

            this.PrimaryPersistence   = CreateSqlPersistence();
            this.SecondaryPersistence = CreateSqlPersistence();

            this.ClearTestLab(); // because of failed previous tests
        }
示例#7
0
 public void TestInitialize()
 {
     FilePersistedTestLab.SetDefaultFileLocations();
 }
 public static void ClassSetUp(TestContext context)
 {
     FilePersistedTestLab.SetDefaultFileLocations();
 }