コード例 #1
0
        public void SubGroupSettings()
        {
            SettingsGroupArxNet subGroup = new SettingsGroupArxNet( testGroup.Storage );
            Assert.IsNotNull( subGroup );
            Assert.IsNotNull( subGroup.Storage );

            subGroup.SaveSetting( "X", 5 );
            subGroup.SaveSetting( "NAME", "Charlie" );
            Assert.AreEqual( 5, subGroup.GetSetting( "X" ) );
            Assert.AreEqual( "Charlie", subGroup.GetSetting( "NAME" ) );

            subGroup.RemoveSetting( "X" );
            Assert.IsNull( subGroup.GetSetting( "X" ), "X not removed" );
            Assert.AreEqual( "Charlie", subGroup.GetSetting( "NAME" ) );

            subGroup.RemoveSetting( "NAME" );
            Assert.IsNull( subGroup.GetSetting( "NAME" ), "NAME not removed" );
        }
コード例 #2
0
 public void BeforeEachTest()
 {
     MemorySettingsStorage storage = new MemorySettingsStorage();
     testGroup = new SettingsGroupArxNet(storage);
     testGroup_storage_null = new SettingsGroupArxNet(null);
 }