public void testCreationSequence() { ConfInt fValue = new ConfInt("test/fValue", 10, 10, 100); test_ConfigGUI gui2 = new test_ConfigGUI(); TrackBarWrapper wrapper3 = new TrackBarWrapper(gui2.trackBar3, "test/fValue"); gui2.Show(); AssertEquals(gui2.trackBar3.Value, fValue.Value); TextBoxWrapper wrapper = new TextBoxWrapper(gui2.textBox4, "test/aValue"); ConfString aValue = new ConfString("test/aValue", "aaa"); AssertEquals(gui2.textBox4.Text, "aaa"); ConfString bValue = new ConfString("test/bValue", "bbb"); TextBoxWrapper wrapper2 = new TextBoxWrapper(gui2.textBox5, "test/bValue"); AssertEquals(gui2.textBox5.Text, "bbb"); fValue.Unregister(); aValue.Unregister(); bValue.Unregister(); gui2.Dispose(); }
public void testSetStorage() { cfg.WriteVal("test/afterLoad", "abc"); ConfValuesManager.GetInstance().LoadFrom(cfg); ConfValuesManager.GetInstance().SetStorage(cfg); ConfString afterLoad = new ConfString("test/afterLoad", ""); AssertEquals(afterLoad.Value, "abc"); afterLoad.Unregister(); }