mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixed many tests
This commit is contained in:
@@ -17,6 +17,8 @@ namespace Terminal.Gui.ViewTests {
|
||||
public void Constructors_Defaults ()
|
||||
{
|
||||
var cb = new ComboBox ();
|
||||
cb.BeginInit ();
|
||||
cb.EndInit ();
|
||||
Assert.Equal (string.Empty, cb.Text);
|
||||
Assert.Null (cb.Source);
|
||||
Assert.False (cb.AutoSize);
|
||||
@@ -24,6 +26,8 @@ namespace Terminal.Gui.ViewTests {
|
||||
Assert.Equal (-1, cb.SelectedItem);
|
||||
|
||||
cb = new ComboBox ("Test");
|
||||
cb.BeginInit ();
|
||||
cb.EndInit ();
|
||||
Assert.Equal ("Test", cb.Text);
|
||||
Assert.Null (cb.Source);
|
||||
Assert.False (cb.AutoSize);
|
||||
@@ -31,6 +35,8 @@ namespace Terminal.Gui.ViewTests {
|
||||
Assert.Equal (-1, cb.SelectedItem);
|
||||
|
||||
cb = new ComboBox (new Rect (1, 2, 10, 20), new List<string> () { "One", "Two", "Three" });
|
||||
cb.BeginInit ();
|
||||
cb.EndInit ();
|
||||
Assert.Equal (string.Empty, cb.Text);
|
||||
Assert.NotNull (cb.Source);
|
||||
Assert.False (cb.AutoSize);
|
||||
@@ -38,6 +44,8 @@ namespace Terminal.Gui.ViewTests {
|
||||
Assert.Equal (-1, cb.SelectedItem);
|
||||
|
||||
cb = new ComboBox (new List<string> () { "One", "Two", "Three" });
|
||||
cb.BeginInit ();
|
||||
cb.EndInit ();
|
||||
Assert.Equal (string.Empty, cb.Text);
|
||||
Assert.NotNull (cb.Source);
|
||||
Assert.False (cb.AutoSize);
|
||||
|
||||
Reference in New Issue
Block a user