Răsfoiți Sursa

Fix ColorPickerTests.

BDisp 1 an în urmă
părinte
comite
408ae43e74
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      UnitTests/Views/ColorPickerTests.cs

+ 3 - 2
UnitTests/Views/ColorPickerTests.cs

@@ -48,8 +48,9 @@ public class ColorPickerTests
     {
     {
         var colorPicker = new ColorPicker { X = 0, Y = 0, Height = 4, Width = 32 };
         var colorPicker = new ColorPicker { X = 0, Y = 0, Height = 4, Width = 32 };
         Assert.Equal (ColorName.Black, colorPicker.SelectedColor);
         Assert.Equal (ColorName.Black, colorPicker.SelectedColor);
-        Application.Top.Add (colorPicker);
-        Application.Begin (Application.Top);
+        var top = new Toplevel ();
+        top.Add (colorPicker);
+        Application.Begin (top);
 
 
         Assert.False (colorPicker.OnMouseEvent (new MouseEvent ()));
         Assert.False (colorPicker.OnMouseEvent (new MouseEvent ()));