2 // ControlStyleTest.cs (Auto-generated by GenerateControlStyleTest.cs).
5 // Peter Dennis Bartok (pbartok@novell.com)
7 // (C) 2005 Novell, Inc. (http://www.novell.com)
10 using System.Windows.Forms;
12 using System.Reflection;
13 using NUnit.Framework;
15 namespace MonoTests.System.Windows.Forms {
17 public class TestControlStyle : TestHelper {
19 static Array style_values = Enum.GetValues(typeof(ControlStyles));
20 static string[] style_names = Enum.GetNames(typeof(ControlStyles));
22 public void AssertAreEqual(string[] want, string[] got, string name) {
23 if (want.Length == got.Length) {
24 for (int i=0; i < want.Length; i++) {
25 if (want[i] != got[i]) {
26 Console.WriteLine("{0}: Expected {1}, got {2}", name, want[i], got[i]);
30 Assert.AreEqual(want, got, name);
33 public static void CheckStyles (Control ctrl, string msg, params ControlStyles [] ExpectedStyles)
35 MethodInfo method = ctrl.GetType ().GetMethod ("GetStyle", BindingFlags.ExactBinding | BindingFlags.NonPublic | BindingFlags.Instance, null, new Type [] {typeof(ControlStyles)}, null);
36 Assert.IsNotNull (method, "Cannot complete test, didn't find GetStyle method on Control");
40 if (ExpectedStyles == null)
41 ExpectedStyles = new ControlStyles [0];
42 foreach (ControlStyles style in Enum.GetValues (typeof(ControlStyles))) {
43 bool result = (bool) method.Invoke (ctrl, new object [] {style});
44 if (Array.IndexOf (ExpectedStyles, style) >= 0) {
46 failed += "\t" + "ControlStyles." + style.ToString () + " was expected, but is not set." + Environment.NewLine;
49 failed += "\t" + "ControlStyles." + style.ToString () + " is set, but was not expected." + Environment.NewLine;
52 if (failed != String.Empty) {
53 Assert.Fail (msg + Environment.NewLine + failed);
57 public static string[] GetStyles(Control control) {
60 result = new string[style_names.Length];
62 for (int i = 0; i < style_values.Length; i++) {
63 result[i] = style_names[i] + "=" + control.GetType().GetMethod("GetStyle", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(control, new object[1] {(ControlStyles)style_values.GetValue(i)});
70 public void ControlStyleTest ()
72 string[] Control_want = {
73 "ContainerControl=False",
82 "SupportsTransparentBackColor=False",
83 "StandardDoubleClick=True",
84 "AllPaintingInWmPaint=True",
86 "EnableNotifyMessage=False",
89 "OptimizedDoubleBuffer=False",
90 "UseTextForAccessibility=True"
94 Assert.AreEqual(Control_want, GetStyles(new Control()), "ControlStyles");
99 public void ButtonStyleTest ()
101 string[] Button_want = {
102 "ContainerControl=False",
108 "StandardClick=False",
111 "SupportsTransparentBackColor=True",
112 "StandardDoubleClick=False",
113 "AllPaintingInWmPaint=True",
115 "EnableNotifyMessage=False",
117 "DoubleBuffer=False",
118 "OptimizedDoubleBuffer=True",
119 "UseTextForAccessibility=True"
125 Assert.AreEqual(Button_want, GetStyles(new Button()), "ButtonStyles");
129 public void CheckBoxStyleTest ()
131 string[] CheckBox_want = {
132 "ContainerControl=False",
138 "StandardClick=False",
141 "SupportsTransparentBackColor=True",
142 "StandardDoubleClick=False",
143 "AllPaintingInWmPaint=True",
145 "EnableNotifyMessage=False",
147 "DoubleBuffer=False",
148 "OptimizedDoubleBuffer=True",
149 "UseTextForAccessibility=True"
155 Assert.AreEqual(CheckBox_want, GetStyles(new CheckBox()), "CheckBoxStyles");
159 public void RadioButtonStyleTest ()
161 string[] RadioButton_want = {
162 "ContainerControl=False",
168 "StandardClick=False",
171 "SupportsTransparentBackColor=True",
172 "StandardDoubleClick=True",
173 "AllPaintingInWmPaint=True",
175 "EnableNotifyMessage=False",
177 "DoubleBuffer=False",
178 "OptimizedDoubleBuffer=True",
179 "UseTextForAccessibility=True"
185 Assert.AreEqual(RadioButton_want, GetStyles(new RadioButton()), "RadioButtonStyles");
189 public void DataGridStyleTest ()
191 string[] DataGrid_want = {
192 "ContainerControl=False",
195 "ResizeRedraw=False",
198 "StandardClick=True",
201 "SupportsTransparentBackColor=False",
202 "StandardDoubleClick=True",
203 "AllPaintingInWmPaint=True",
205 "EnableNotifyMessage=False",
206 "DoubleBuffer=False",
208 "OptimizedDoubleBuffer=False",
209 "UseTextForAccessibility=True"
213 Assert.AreEqual(DataGrid_want, GetStyles(new DataGrid()), "DataGridStyles");
217 public void DateTimePickerStyleTest ()
219 string[] DateTimePicker_want = {
220 "ContainerControl=False",
223 "ResizeRedraw=False",
226 "StandardClick=False",
229 "SupportsTransparentBackColor=False",
230 "StandardDoubleClick=True",
231 "AllPaintingInWmPaint=True",
233 "EnableNotifyMessage=False",
234 "DoubleBuffer=False",
236 "OptimizedDoubleBuffer=False",
237 "UseTextForAccessibility=True"
241 Assert.AreEqual(DateTimePicker_want, GetStyles(new DateTimePicker()), "DateTimePickerStyles");
245 public void GroupBoxStyleTest ()
247 string[] GroupBox_want = {
248 "ContainerControl=True",
254 "StandardClick=True",
257 "SupportsTransparentBackColor=True",
258 "StandardDoubleClick=True",
259 "AllPaintingInWmPaint=True",
261 "EnableNotifyMessage=False",
262 "DoubleBuffer=False",
264 "OptimizedDoubleBuffer=False",
265 "UseTextForAccessibility=True"
269 Assert.AreEqual(GroupBox_want, GetStyles(new GroupBox()), "GroupBoxStyles");
273 public void LabelStyleTest ()
275 string[] Label_want = {
276 "ContainerControl=False",
282 "StandardClick=True",
285 "SupportsTransparentBackColor=True",
286 "StandardDoubleClick=True",
287 "AllPaintingInWmPaint=True",
289 "EnableNotifyMessage=False",
291 "DoubleBuffer=False",
292 "OptimizedDoubleBuffer=True",
293 "UseTextForAccessibility=True"
299 Assert.AreEqual(Label_want, GetStyles(new Label()), "LabelStyles");
303 public void LinkLabelStyleTest ()
305 string[] LinkLabel_want = {
306 "ContainerControl=False",
312 "StandardClick=True",
315 "SupportsTransparentBackColor=True",
316 "StandardDoubleClick=True",
317 "AllPaintingInWmPaint=True",
319 "EnableNotifyMessage=False",
321 "DoubleBuffer=False",
322 "OptimizedDoubleBuffer=True",
323 "UseTextForAccessibility=True"
329 string[] LinkLabel_link_want = {
330 "ContainerControl=False",
336 "StandardClick=True",
339 "SupportsTransparentBackColor=True",
340 "StandardDoubleClick=True",
341 "AllPaintingInWmPaint=True",
343 "EnableNotifyMessage=False",
345 "DoubleBuffer=False",
346 "OptimizedDoubleBuffer=True",
347 "UseTextForAccessibility=True"
353 LinkLabel link = new LinkLabel ();
355 // Test LinkLabel without text and without links
356 Assert.AreEqual(LinkLabel_want, GetStyles(link), "#1");
358 // Test LinkLabel with only text
359 link.Text = "Users need not fear making the switch to Linux";
361 Assert.AreEqual (LinkLabel_want, GetStyles (link), "#2");
363 // Test LinkLabel with a link
364 link.Links.Add (6, 9, "http://link1");
365 Assert.AreEqual(LinkLabel_link_want, GetStyles(link), "#3");
369 public void ComboBoxStyleTest ()
371 string[] ComboBox_want = {
372 "ContainerControl=False",
375 "ResizeRedraw=False",
378 "StandardClick=False",
381 "SupportsTransparentBackColor=False",
382 "StandardDoubleClick=True",
383 "AllPaintingInWmPaint=True",
385 "EnableNotifyMessage=False",
386 "DoubleBuffer=False",
388 "OptimizedDoubleBuffer=False",
389 "UseTextForAccessibility=False"
393 Assert.AreEqual(ComboBox_want, GetStyles(new ComboBox()), "ComboBoxStyles");
397 public void ListBoxStyleTest ()
399 string[] ListBox_want = {
400 "ContainerControl=False",
403 "ResizeRedraw=False",
406 "StandardClick=False",
409 "SupportsTransparentBackColor=False",
410 "StandardDoubleClick=True",
411 "AllPaintingInWmPaint=True",
413 "EnableNotifyMessage=False",
414 "DoubleBuffer=False",
416 "OptimizedDoubleBuffer=False",
417 "UseTextForAccessibility=False"
421 Assert.AreEqual(ListBox_want, GetStyles(new ListBox()), "ListBoxStyles");
425 public void CheckedListBoxStyleTest ()
427 string[] CheckedListBox_want = {
428 "ContainerControl=False",
434 "StandardClick=False",
437 "SupportsTransparentBackColor=False",
438 "StandardDoubleClick=True",
439 "AllPaintingInWmPaint=True",
441 "EnableNotifyMessage=False",
442 "DoubleBuffer=False",
444 "OptimizedDoubleBuffer=False",
445 "UseTextForAccessibility=False"
449 Assert.AreEqual(CheckedListBox_want, GetStyles(new CheckedListBox()), "CheckedListBoxStyles");
453 public void ListViewStyleTest ()
455 string[] ListView_want = {
456 "ContainerControl=False",
459 "ResizeRedraw=False",
462 "StandardClick=False",
465 "SupportsTransparentBackColor=False",
466 "StandardDoubleClick=True",
467 "AllPaintingInWmPaint=True",
469 "EnableNotifyMessage=False",
470 "DoubleBuffer=False",
472 "OptimizedDoubleBuffer=False",
473 "UseTextForAccessibility=False"
477 Assert.AreEqual(ListView_want, GetStyles(new ListView()), "ListViewStyles");
481 public void MdiClientStyleTest ()
483 string[] MdiClient_want = {
484 "ContainerControl=False",
487 "ResizeRedraw=False",
490 "StandardClick=True",
493 "SupportsTransparentBackColor=False",
494 "StandardDoubleClick=True",
495 "AllPaintingInWmPaint=True",
497 "EnableNotifyMessage=False",
498 "DoubleBuffer=False",
500 "OptimizedDoubleBuffer=False",
501 "UseTextForAccessibility=True"
505 Assert.AreEqual(MdiClient_want, GetStyles(new MdiClient()), "MdiClientStyles");
509 public void MonthCalendarStyleTest ()
511 string[] MonthCalendar_want = {
512 "ContainerControl=False",
515 "ResizeRedraw=False",
518 "StandardClick=False",
521 "SupportsTransparentBackColor=False",
522 "StandardDoubleClick=True",
523 "AllPaintingInWmPaint=True",
525 "EnableNotifyMessage=False",
526 "DoubleBuffer=False",
528 "OptimizedDoubleBuffer=False",
529 "UseTextForAccessibility=True"
533 Assert.AreEqual(MonthCalendar_want, GetStyles(new MonthCalendar()), "MonthCalendarStyles");
537 public void PictureBoxStyleTest ()
539 string[] PictureBox_want = {
540 "ContainerControl=False",
543 "ResizeRedraw=False",
546 "StandardClick=True",
549 "SupportsTransparentBackColor=True",
550 "StandardDoubleClick=True",
551 "AllPaintingInWmPaint=True",
553 "EnableNotifyMessage=False",
555 "DoubleBuffer=False",
556 "OptimizedDoubleBuffer=True",
557 "UseTextForAccessibility=True"
563 Assert.AreEqual(PictureBox_want, GetStyles(new PictureBox()), "PictureBoxStyles");
567 public void ProgressBarStyleTest ()
569 string[] ProgressBar_want = {
570 "ContainerControl=False",
573 "ResizeRedraw=False",
576 "StandardClick=True",
579 "SupportsTransparentBackColor=False",
580 "StandardDoubleClick=True",
581 "AllPaintingInWmPaint=True",
583 "EnableNotifyMessage=False",
584 "DoubleBuffer=False",
586 "OptimizedDoubleBuffer=False",
587 "UseTextForAccessibility=False"
591 Assert.AreEqual(ProgressBar_want, GetStyles(new ProgressBar()), "ProgressBarStyles");
595 public void ScrollableControlStyleTest ()
597 string[] ScrollableControl_want = {
598 "ContainerControl=True",
601 "ResizeRedraw=False",
604 "StandardClick=True",
607 "SupportsTransparentBackColor=False",
608 "StandardDoubleClick=True",
609 "AllPaintingInWmPaint=False",
611 "EnableNotifyMessage=False",
612 "DoubleBuffer=False",
614 "OptimizedDoubleBuffer=False",
615 "UseTextForAccessibility=True"
619 Assert.AreEqual(ScrollableControl_want, GetStyles(new ScrollableControl()), "ScrollableControlStyles");
623 public void ContainerControlStyleTest ()
625 string[] ContainerControl_want = {
626 "ContainerControl=True",
629 "ResizeRedraw=False",
632 "StandardClick=True",
635 "SupportsTransparentBackColor=False",
636 "StandardDoubleClick=True",
637 "AllPaintingInWmPaint=False",
639 "EnableNotifyMessage=False",
640 "DoubleBuffer=False",
642 "OptimizedDoubleBuffer=False",
643 "UseTextForAccessibility=True"
647 Assert.AreEqual(ContainerControl_want, GetStyles(new ContainerControl()), "ContainerControlStyles");
651 public void FormStyleTest ()
653 string[] Form_want = {
654 "ContainerControl=True",
657 "ResizeRedraw=False",
660 "StandardClick=True",
663 "SupportsTransparentBackColor=False",
664 "StandardDoubleClick=True",
665 "AllPaintingInWmPaint=False",
667 "EnableNotifyMessage=False",
668 "DoubleBuffer=False",
670 "OptimizedDoubleBuffer=False",
671 "UseTextForAccessibility=True"
675 Form f = new Form ();
676 f.ShowInTaskbar = false;
677 Assert.AreEqual(Form_want, GetStyles(f), "FormStyles");
682 public void PropertyGridStyleTest ()
684 string[] PropertyGrid_want = {
685 "ContainerControl=True",
688 "ResizeRedraw=False",
691 "StandardClick=True",
694 "SupportsTransparentBackColor=False",
695 "StandardDoubleClick=True",
696 "AllPaintingInWmPaint=False",
698 "EnableNotifyMessage=False",
699 "DoubleBuffer=False",
701 "OptimizedDoubleBuffer=False",
702 "UseTextForAccessibility=True"
706 Assert.AreEqual(PropertyGrid_want, GetStyles(new PropertyGrid()), "PropertyGridStyles");
710 public void DomainUpDownStyleTest ()
712 string[] DomainUpDown_want = {
713 "ContainerControl=True",
720 "ResizeRedraw=False",
725 "StandardClick=False",
727 "StandardClick=True",
731 "SupportsTransparentBackColor=False",
732 "StandardDoubleClick=True",
733 "AllPaintingInWmPaint=False",
735 "EnableNotifyMessage=False",
736 "DoubleBuffer=False",
738 "OptimizedDoubleBuffer=False",
739 "UseTextForAccessibility=False"
743 Assert.AreEqual(DomainUpDown_want, GetStyles(new DomainUpDown()), "DomainUpDownStyles");
747 public void NumericUpDownStyleTest ()
749 string[] NumericUpDown_want = {
750 "ContainerControl=True",
757 "ResizeRedraw=False",
762 "StandardClick=False",
764 "StandardClick=True",
768 "SupportsTransparentBackColor=False",
769 "StandardDoubleClick=True",
770 "AllPaintingInWmPaint=False",
772 "EnableNotifyMessage=False",
773 "DoubleBuffer=False",
775 "OptimizedDoubleBuffer=False",
776 "UseTextForAccessibility=False"
780 Assert.AreEqual(NumericUpDown_want, GetStyles(new NumericUpDown()), "NumericUpDownStyles");
784 public void UserControlStyleTest ()
786 string[] UserControl_want = {
787 "ContainerControl=True",
790 "ResizeRedraw=False",
793 "StandardClick=True",
797 "SupportsTransparentBackColor=True",
799 "SupportsTransparentBackColor=False",
801 "StandardDoubleClick=True",
802 "AllPaintingInWmPaint=False",
804 "EnableNotifyMessage=False",
805 "DoubleBuffer=False",
807 "OptimizedDoubleBuffer=False",
808 "UseTextForAccessibility=True"
812 Assert.AreEqual(UserControl_want, GetStyles(new UserControl()), "UserControlStyles");
816 public void PanelStyleTest ()
818 string[] Panel_want = {
819 "ContainerControl=True",
822 "ResizeRedraw=False",
825 "StandardClick=True",
828 "SupportsTransparentBackColor=True",
829 "StandardDoubleClick=True",
830 "AllPaintingInWmPaint=False",
832 "EnableNotifyMessage=False",
833 "DoubleBuffer=False",
835 "OptimizedDoubleBuffer=False",
836 "UseTextForAccessibility=True"
840 Assert.AreEqual(Panel_want, GetStyles(new Panel()), "PanelStyles");
844 public void TabPageStyleTest ()
846 string[] TabPage_want = {
847 "ContainerControl=True",
850 "ResizeRedraw=False",
853 "StandardClick=True",
856 "SupportsTransparentBackColor=True",
857 "StandardDoubleClick=True",
858 "AllPaintingInWmPaint=False",
860 "EnableNotifyMessage=False",
861 "DoubleBuffer=False",
863 "OptimizedDoubleBuffer=False",
864 "UseTextForAccessibility=True"
868 Assert.AreEqual(TabPage_want, GetStyles(new TabPage()), "TabPageStyles");
872 public void HScrollBarStyleTest ()
874 string[] HScrollBar_want = {
875 "ContainerControl=False",
878 "ResizeRedraw=False",
881 "StandardClick=False",
884 "SupportsTransparentBackColor=False",
885 "StandardDoubleClick=True",
886 "AllPaintingInWmPaint=True",
888 "EnableNotifyMessage=False",
889 "DoubleBuffer=False",
891 "OptimizedDoubleBuffer=False",
892 "UseTextForAccessibility=False"
896 Assert.AreEqual(HScrollBar_want, GetStyles(new HScrollBar()), "HScrollBarStyles");
900 public void VScrollBarStyleTest ()
902 string[] VScrollBar_want = {
903 "ContainerControl=False",
906 "ResizeRedraw=False",
909 "StandardClick=False",
912 "SupportsTransparentBackColor=False",
913 "StandardDoubleClick=True",
914 "AllPaintingInWmPaint=True",
916 "EnableNotifyMessage=False",
917 "DoubleBuffer=False",
919 "OptimizedDoubleBuffer=False",
920 "UseTextForAccessibility=False"
924 Assert.AreEqual(VScrollBar_want, GetStyles(new VScrollBar()), "VScrollBarStyles");
928 public void SplitterStyleTest ()
930 string[] Splitter_want = {
931 "ContainerControl=False",
934 "ResizeRedraw=False",
937 "StandardClick=True",
940 "SupportsTransparentBackColor=False",
941 "StandardDoubleClick=True",
942 "AllPaintingInWmPaint=True",
944 "EnableNotifyMessage=False",
945 "DoubleBuffer=False",
947 "OptimizedDoubleBuffer=False",
948 "UseTextForAccessibility=True"
952 Assert.AreEqual(Splitter_want, GetStyles(new Splitter()), "SplitterStyles");
956 public void StatusBarStyleTest ()
958 string[] StatusBar_want = {
959 "ContainerControl=False",
962 "ResizeRedraw=False",
965 "StandardClick=True",
968 "SupportsTransparentBackColor=False",
969 "StandardDoubleClick=True",
970 "AllPaintingInWmPaint=True",
972 "EnableNotifyMessage=False",
973 "DoubleBuffer=False",
975 "OptimizedDoubleBuffer=False",
976 "UseTextForAccessibility=True"
980 Assert.AreEqual(StatusBar_want, GetStyles(new StatusBar()), "StatusBarStyles");
984 public void TabControlStyleTest ()
986 string[] TabControl_want = {
987 "ContainerControl=False",
990 "ResizeRedraw=False",
993 "StandardClick=True",
996 "SupportsTransparentBackColor=False",
997 "StandardDoubleClick=True",
998 "AllPaintingInWmPaint=True",
1000 "EnableNotifyMessage=False",
1001 "DoubleBuffer=False",
1003 "OptimizedDoubleBuffer=False",
1004 "UseTextForAccessibility=True"
1008 Assert.AreEqual(TabControl_want, GetStyles(new TabControl()), "TabControlStyles");
1012 public void RichTextBoxStyleTest ()
1014 string[] RichTextBox_want = {
1015 "ContainerControl=False",
1018 "ResizeRedraw=False",
1020 "FixedHeight=False",
1021 "StandardClick=False",
1024 "SupportsTransparentBackColor=False",
1026 "StandardDoubleClick=False",
1028 "StandardDoubleClick=True",
1030 "AllPaintingInWmPaint=True",
1032 "EnableNotifyMessage=False",
1033 "DoubleBuffer=False",
1035 "OptimizedDoubleBuffer=False",
1036 "UseTextForAccessibility=False"
1040 Assert.AreEqual(RichTextBox_want, GetStyles(new RichTextBox()), "RichTextBoxStyles");
1044 public void TextBoxStyleTest ()
1046 string[] TextBox_want = {
1047 "ContainerControl=False",
1050 "ResizeRedraw=False",
1053 "StandardClick=False",
1056 "SupportsTransparentBackColor=False",
1057 "StandardDoubleClick=False",
1058 "AllPaintingInWmPaint=True",
1060 "EnableNotifyMessage=False",
1061 "DoubleBuffer=False",
1063 "OptimizedDoubleBuffer=False",
1064 "UseTextForAccessibility=False"
1068 Assert.AreEqual(TextBox_want, GetStyles(new TextBox()), "TextBoxStyles");
1072 public void DataGridTextBoxStyleTest ()
1074 string[] DataGridTextBox_want = {
1075 "ContainerControl=False",
1078 "ResizeRedraw=False",
1081 "StandardClick=False",
1084 "SupportsTransparentBackColor=False",
1085 "StandardDoubleClick=False",
1086 "AllPaintingInWmPaint=True",
1088 "EnableNotifyMessage=False",
1089 "DoubleBuffer=False",
1091 "OptimizedDoubleBuffer=False",
1092 "UseTextForAccessibility=False"
1096 Assert.AreEqual(DataGridTextBox_want, GetStyles(new DataGridTextBox()), "DataGridTextBoxStyles");
1100 public void ToolBarStyleTest ()
1102 string[] ToolBar_want = {
1103 "ContainerControl=False",
1106 "ResizeRedraw=False",
1109 "StandardClick=True",
1112 "SupportsTransparentBackColor=False",
1113 "StandardDoubleClick=True",
1114 "AllPaintingInWmPaint=True",
1116 "EnableNotifyMessage=False",
1117 "DoubleBuffer=False",
1119 "OptimizedDoubleBuffer=False",
1120 "UseTextForAccessibility=True"
1124 Assert.AreEqual(ToolBar_want, GetStyles(new ToolBar()), "ToolBarStyles");
1128 public void TrackBarStyleTest ()
1130 string[] TrackBar_want = {
1131 "ContainerControl=False",
1134 "ResizeRedraw=False",
1136 "FixedHeight=False",
1137 "StandardClick=True",
1140 "SupportsTransparentBackColor=False",
1141 "StandardDoubleClick=True",
1142 "AllPaintingInWmPaint=True",
1144 "EnableNotifyMessage=False",
1145 "DoubleBuffer=False",
1147 "OptimizedDoubleBuffer=False",
1148 "UseTextForAccessibility=False"
1152 Assert.AreEqual(TrackBar_want, GetStyles(new TrackBar()), "TrackBarStyles");
1156 public void TreeViewStyleTest ()
1158 string[] TreeView_want = {
1159 "ContainerControl=False",
1162 "ResizeRedraw=False",
1164 "FixedHeight=False",
1165 "StandardClick=False",
1168 "SupportsTransparentBackColor=False",
1169 "StandardDoubleClick=True",
1170 "AllPaintingInWmPaint=True",
1172 "EnableNotifyMessage=False",
1173 "DoubleBuffer=False",
1175 "OptimizedDoubleBuffer=False",
1176 "UseTextForAccessibility=False"
1180 Assert.AreEqual(TreeView_want, GetStyles(new TreeView()), "TreeViewStyles");