public void testTextBox() { configGui.Show(); AssertEquals(configGui.textBox1.Text, "0"); // initial value configGui.textBox2.Text = "12"; AssertEquals(aCount.Value, 12); }
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 testRadioGroup() { test_ConfigGUI gui2 = new test_ConfigGUI(); gui2.Show(); AssertEquals(gui2.radioButton4.Checked, false); AssertEquals(gui2.radioButton5.Checked, true); AssertEquals(gui2.radioButton6.Checked, false); AssertEquals(configGui.radioButton1.Checked, false); AssertEquals(configGui.radioButton2.Checked, true); AssertEquals(configGui.radioButton3.Checked, false); cCount.Value = 0; AssertEquals(configGui.radioButton1.Checked, true); AssertEquals(configGui.radioButton2.Checked, false); AssertEquals(configGui.radioButton3.Checked, false); configGui.radioButton3.Checked = true; AssertEquals(cCount.Value, 2); // test overflow AssertExceptionThrown <InvalidOperationException>(delegate() { cCount.Value = 3; }); }