Author: everaldo
Date: 2007-05-11 11:08:16 -0400 (Fri, 11 May 2007)
New Revision: 77243

Modified:
   trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarTest.cs
Log:
2007-05-11  Everaldo Canuto  <[EMAIL PROTECTED]>

        * ToolBarTest.cs: Add tests for toolbar size (horizontal and vertical),
        also test #81523.



Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-05-11 14:49:30 UTC (rev 77242)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog   
2007-05-11 15:08:16 UTC (rev 77243)
@@ -1,3 +1,8 @@
+2007-05-11  Everaldo Canuto  <[EMAIL PROTECTED]>
+
+       * ToolBarTest.cs: Add tests for toolbar size (horizontal and vertical),
+       also test #81523.
+
 2007-05-10  Everaldo Canuto  <[EMAIL PROTECTED]>
 
        * ToolBarTest.cs: CreateHandleTest added.

Modified: 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarTest.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarTest.cs  
    2007-05-11 14:49:30 UTC (rev 77242)
+++ 
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarTest.cs  
    2007-05-11 15:08:16 UTC (rev 77243)
@@ -191,6 +191,55 @@
                        form.Close ();
                }
 
+               [Test]
+               public void HorizontalSizeTest ()
+               {
+                       // Test aproximated sizes (> 30 and < 30) because it 
depends of font size. 
+                       Form form = new Form ();
+                       form.ShowInTaskbar = false;
+                       form.Show ();
+                       
+                       ToolBar toolbar = new ToolBar ();
+                       Assert.IsTrue (toolbar.Size.Height > 30, "#1");
+
+                       toolbar.Buttons.Add (new ToolBarButton (""));
+                       Assert.IsTrue (toolbar.Size.Height > 30, "#2");
+
+                       form.Controls.Add (toolbar);
+                       Assert.IsTrue (toolbar.Size.Height < 30, "#3");
+
+                       // TODO: Notworking at moment.
+                       //toolbar.Buttons.Add (new ToolBarButton ("Test"));
+                       //Assert.IsTrue (toolbar.Size.Height > 30, "#4");
+                       
+                       form.Close ();
+               }
+
+               [Test]
+               public void VerticalSizeTest ()
+               {
+                       // Test aproximated sizes (> 30 and < 30) because it 
depends of font size. 
+                       Form form = new Form ();
+                       form.ShowInTaskbar = false;
+                       form.Show ();
+                       
+                       ToolBar toolbar = new ToolBar ();
+                       toolbar.Dock = DockStyle.Left;
+                       Assert.IsTrue (toolbar.Size.Width > 30, "#1");
+
+                       toolbar.Buttons.Add (new ToolBarButton (""));
+                       Assert.IsTrue (toolbar.Size.Width > 30, "#2");
+
+                       form.Controls.Add (toolbar);
+                       Assert.IsTrue (toolbar.Size.Width < 30, "#3");
+
+                       // TODO: Notworking at moment.
+                       //toolbar.Buttons.Add (new ToolBarButton ("Test"));
+                       //Assert.IsTrue (toolbar.Size.Width > 30, "#4");
+                       
+                       form.Close ();
+               }
+
        }
 
        // [MonoTODO ("Add test for ButtonClickEvent (Visual Test)"]

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to