Exemple #1
0
        public void Add_InsertNewSetting()
        {
            mdnaSettings.Settings settings = new mdnaSettings.Settings();

            settings.Clear();
            Assert.AreEqual( 0, settings.Count );

            settings.Add( m_settingName, m_settingNameValue );

            Assert.AreEqual( settings.Count, 1 );
            Assert.AreEqual( m_settingNameValue, settings.Get( m_settingName ) );
        }
Exemple #2
0
        public void Clear_AddManyKeysThenClear()
        {
            mdnaSettings.Settings settings = new mdnaSettings.Settings();

            Assert.AreEqual( 0, settings.Count );

            settings.Add( "foo", "bar" );
            settings.Add( "peanut butter", "jelly" );
            settings.Add( "laverne", "shirley" );

            Assert.AreEqual( 3, settings.Count );

            settings.Clear();

            Assert.AreEqual( 0, settings.Count );
        }
Exemple #3
0
        public void Remove_ClearSettingsAddAnObjectThenRemoveIt( )
        {
            mdnaSettings.Settings settings = new mdnaSettings.Settings();

            settings.Clear();
            Assert.AreEqual( 0, settings.Count );

            settings.Add( m_settingName, m_settingNameValue );
            Assert.AreEqual( 1, settings.Count );

            settings.Remove( m_settingName );
            Assert.AreEqual( 0, settings.Count );

            Assert.AreEqual( "", settings.Get( m_settingName ) );
        }