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 ) ); }
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 ); }
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 ) ); }