2 // StatusBarTest.cs: Test cases for StatusBar.
5 // Ritvik Mayank (mritvik@novell.com)
7 // (C) 2005 Novell, Inc. (http://www.novell.com)
11 using NUnit
.Framework
;
12 using System
.Windows
.Forms
;
14 using System
.Runtime
.Remoting
;
16 namespace MonoTests
.System
.Windows
.Forms
19 public class StatusBarTest
23 public void StatusBarPropertyTest ()
25 Form myform
= new Form ();
26 myform
.ShowInTaskbar
= false;
27 StatusBar mysbar
= new StatusBar ();
28 StatusBarPanel sbarpanel1
= new StatusBarPanel ();
29 StatusBarPanel sbarpanel2
= new StatusBarPanel ();
30 sbarpanel1
.Text
= "Status Quo";
31 sbarpanel2
.Text
= "State 2";
32 mysbar
.Panels
.Add (sbarpanel1
);
33 mysbar
.Panels
.Add (sbarpanel2
);
34 myform
.Controls
.Add (mysbar
);
37 Assert
.AreEqual ("Control", mysbar
.BackColor
.Name
, "#B1");
40 Assert
.AreEqual (DockStyle
.Bottom
, mysbar
.Dock
, "#D1");
43 Assert
.AreEqual ("ControlText", mysbar
.ForeColor
.Name
, "#F2");
46 Assert
.AreEqual (sbarpanel1
.Text
, mysbar
.Panels
[0].Text
, "#P1");
49 Assert
.AreEqual (false, mysbar
.ShowPanels
, "#S1");
50 Assert
.AreEqual (true, mysbar
.SizingGrip
, "#S2");
51 Assert
.AreEqual (null, mysbar
.Site
, "#S3");
54 Assert
.AreEqual ("", mysbar
.Text
, "#T1");
55 mysbar
.Text
= "MONO STATUSBAR";
56 Assert
.AreEqual ("MONO STATUSBAR", mysbar
.Text
, "#T2");
62 public void ToStringMethodTest ()
64 StatusBar mysbar
= new StatusBar ();
65 mysbar
.Text
= "New StatusBar";
66 Assert
.AreEqual ("System.Windows.Forms.StatusBar, Panels.Count: 0", mysbar
.ToString (), "#T3");
68 //[MonoTODO ("Test case for DrawItem")]
69 //[MonoTODO ("Test case for PanelClick")]