AddSetting() public méthode

public AddSetting ( string settingName, string provider ) : void
settingName string
provider string
Résultat void
        public void UseEnvironmentSettingsToAdAnEnvironment()
        {
            var env = new Environment("Test", "Test");

            env.AddSetting("Test", "Test");

            _source   = new TestSource();
            _settings = new EnvironmentSettingsCollection(_source);
            var col = new EnvironmentCollection(_settings);

            Isolate.WhenCalled(() => _settings.Add(null)).IgnoreCall();
            col.Add(env);
            Isolate.Verify.WasCalledWithAnyArguments(() => _settings.Add(null));
        }
        public void UseEnvironmentSettingsToAdAnEnvironment()
        {
            var env = new Environment("Test", "Test");
            env.AddSetting("Test", "Test");

            _source = new TestSource();
            _settings = new EnvironmentSettingsCollection(_source);
            var col = new EnvironmentCollection(_settings);

            Isolate.WhenCalled(() => _settings.Add(null)).IgnoreCall();
            col.Add(env);
            Isolate.Verify.WasCalledWithAnyArguments(() => _settings.Add(null));
        }