New test.
[mono.git] / mcs / class / Managed.Windows.Forms / Test / System.Windows.Forms / GroupBoxTest.cs
1 //
2 // GroupBoxTest.cs: Test cases for GroupBox.
3 //
4 // Author:
5 //   Ritvik Mayank (mritvik@novell.com)
6 //
7 // (C) 2005 Novell, Inc. (http://www.novell.com)
8 //
9
10 using System;
11 using System.Windows.Forms;
12 using System.Drawing;
13 using System.Reflection;
14 using NUnit.Framework;
15
16 namespace MonoTests.System.Windows.Forms
17 {
18         [TestFixture]
19         public class GroupBoxTest
20         {
21                 [Test]
22                 public void GroupBoxPropertyTest ()
23                 {
24                         Form myform = new Form ();
25                         GroupBox mygrpbox = new GroupBox ();
26                         RadioButton myradiobutton1 = new RadioButton ();
27                         RadioButton myradiobutton2 = new RadioButton ();
28                         mygrpbox.Controls.Add (myradiobutton1);
29                         mygrpbox.Controls.Add (myradiobutton2);
30                         myform.Show ();
31                         Assert.AreEqual (FlatStyle.Standard, mygrpbox.FlatStyle, "#1");
32                         mygrpbox.FlatStyle = FlatStyle.Popup;
33                         Assert.AreEqual (FlatStyle.Popup, mygrpbox.FlatStyle, "#2");
34                         mygrpbox.FlatStyle = FlatStyle.Flat;
35                         Assert.AreEqual (FlatStyle.Flat, mygrpbox.FlatStyle, "#3");
36                         mygrpbox.FlatStyle = FlatStyle.System;
37                         Assert.AreEqual (FlatStyle.System, mygrpbox.FlatStyle, "#4");
38                 }
39         }
40 }