2006-12-19 Daniel Nauck <dna@mono-project.de>
[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                         myform.ShowInTaskbar = false;
26                         GroupBox mygrpbox = new GroupBox ();
27                         RadioButton myradiobutton1 = new RadioButton ();
28                         RadioButton myradiobutton2 = new RadioButton ();
29                         mygrpbox.Controls.Add (myradiobutton1);
30                         mygrpbox.Controls.Add (myradiobutton2);
31                         myform.Show ();
32                         Assert.AreEqual (FlatStyle.Standard, mygrpbox.FlatStyle, "#1");
33                         mygrpbox.FlatStyle = FlatStyle.Popup;
34                         Assert.AreEqual (FlatStyle.Popup, mygrpbox.FlatStyle, "#2");
35                         mygrpbox.FlatStyle = FlatStyle.Flat;
36                         Assert.AreEqual (FlatStyle.Flat, mygrpbox.FlatStyle, "#3");
37                         mygrpbox.FlatStyle = FlatStyle.System;
38                         Assert.AreEqual (FlatStyle.System, mygrpbox.FlatStyle, "#4");
39                         myform.Dispose ();
40                 }
41         }
42 }