Exemple #1
0
        public void Apply_ShouldSet_OvpnProtocol_ToAuto(string previousValue)
        {
            // Arrange
            _storage.Get <string>("OvpnProtocol").Returns(previousValue);
            var migration = new AppSettingsMigration(_storage);

            // Act
            migration.Apply();
            // Assert
            _storage.Received().Set("OvpnProtocol", "auto");
        }
Exemple #2
0
        public void Apply_ShouldMigrate_SecureCore(bool value)
        {
            // Arrange
            _appSettings.Get <bool>("SecureCore").Returns(value);
            var migration = new UserSettingsMigration(_appSettings, _userSettings);

            // Act
            migration.Apply();
            // Assert
            _userSettings.Received().Set("SecureCore", value);
        }
        public void Apply_Should_SwitchOff_SplitTunnel_WhenKillSwitch_IsOn()
        {
            // Arrange
            _storage.Get <bool>("KillSwitch").Returns(true);
            _storage.Get <bool>("SplitTunnelingEnabled").Returns(true);
            var migration = new AppSettingsMigration(_storage);

            // Act
            migration.Apply();
            // Assert
            _storage.Received().Set("SplitTunnelingEnabled", false);
        }