New test.
[mono.git] / mcs / class / Managed.Windows.Forms / Test / System.Windows.Forms / ControlStyleTest.cs
1 //
2 // ControlStyleTest.cs (Auto-generated by GenerateControlStyleTest.cs).
3 //
4 // Author: 
5 //   Peter Dennis Bartok (pbartok@novell.com)
6 //
7 // (C) 2005 Novell, Inc. (http://www.novell.com)
8 //
9 using System;
10 using System.Windows.Forms;
11 using System.Drawing;
12 using System.Reflection;
13 using NUnit.Framework;
14
15 namespace MonoTests.System.Windows.Forms {
16         [TestFixture]
17         public class TestControlStyle {
18
19                 static Array style_values = Enum.GetValues(typeof(ControlStyles));
20                 static string[] style_names = Enum.GetNames(typeof(ControlStyles));
21
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]);
27                                         }
28                                 }
29                         }
30                         Assert.AreEqual(want, got, name);
31                 }
32
33                 public static string[] GetStyles(Control control) {
34                         string[] result;
35
36                         result = new string[style_names.Length];
37
38                         for (int i = 0; i < style_values.Length; i++) {
39                                 result[i] = style_names[i] + "=" + control.GetType().GetMethod("GetStyle", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(control, new object[1] {(ControlStyles)style_values.GetValue(i)});
40                         }
41
42                         return result;
43                 }
44
45                 [Test]
46                 public void ControlStyleTest ()
47                 {
48                         string[] Control_want = {
49                                 "ContainerControl=False",
50                                 "UserPaint=True",
51                                 "Opaque=False",
52                                 "ResizeRedraw=False",
53                                 "FixedWidth=False",
54                                 "FixedHeight=False",
55                                 "StandardClick=True",
56                                 "Selectable=True",
57                                 "UserMouse=False",
58                                 "SupportsTransparentBackColor=False",
59                                 "StandardDoubleClick=True",
60                                 "AllPaintingInWmPaint=True",
61                                 "CacheText=False",
62                                 "EnableNotifyMessage=False",
63                                 "DoubleBuffer=False"
64                         };
65
66                         Assert.AreEqual(Control_want, GetStyles(new Control()), "ControlStyles");
67                 }
68
69
70                 [Test]
71                 public void ButtonStyleTest ()
72                 {
73                         string[] Button_want = {
74                                 "ContainerControl=False",
75                                 "UserPaint=True",
76                                 "Opaque=True",
77                                 "ResizeRedraw=True",
78                                 "FixedWidth=False",
79                                 "FixedHeight=False",
80                                 "StandardClick=False",
81                                 "Selectable=True",
82                                 "UserMouse=True",
83                                 "SupportsTransparentBackColor=True",
84                                 "StandardDoubleClick=False",
85                                 "AllPaintingInWmPaint=True",
86                                 "CacheText=True",
87                                 "EnableNotifyMessage=False",
88                                 "DoubleBuffer=True"
89                         };
90
91                         Assert.AreEqual(Button_want, GetStyles(new Button()), "ButtonStyles");
92                 }
93
94
95                 [Test]
96                 public void CheckBoxStyleTest ()
97                 {
98                         string[] CheckBox_want = {
99                                 "ContainerControl=False",
100                                 "UserPaint=True",
101                                 "Opaque=True",
102                                 "ResizeRedraw=True",
103                                 "FixedWidth=False",
104                                 "FixedHeight=False",
105                                 "StandardClick=False",
106                                 "Selectable=True",
107                                 "UserMouse=True",
108                                 "SupportsTransparentBackColor=True",
109                                 "StandardDoubleClick=False",
110                                 "AllPaintingInWmPaint=True",
111                                 "CacheText=True",
112                                 "EnableNotifyMessage=False",
113                                 "DoubleBuffer=True"
114                         };
115
116                         Assert.AreEqual(CheckBox_want, GetStyles(new CheckBox()), "CheckBoxStyles");
117                 }
118
119
120                 [Test]
121                 public void RadioButtonStyleTest ()
122                 {
123                         string[] RadioButton_want = {
124                                 "ContainerControl=False",
125                                 "UserPaint=True",
126                                 "Opaque=True",
127                                 "ResizeRedraw=True",
128                                 "FixedWidth=False",
129                                 "FixedHeight=False",
130                                 "StandardClick=False",
131                                 "Selectable=True",
132                                 "UserMouse=True",
133                                 "SupportsTransparentBackColor=True",
134                                 "StandardDoubleClick=True",
135                                 "AllPaintingInWmPaint=True",
136                                 "CacheText=True",
137                                 "EnableNotifyMessage=False",
138                                 "DoubleBuffer=True"
139                         };
140
141                         Assert.AreEqual(RadioButton_want, GetStyles(new RadioButton()), "RadioButtonStyles");
142                 }
143
144
145                 [Test]
146                 public void DataGridStyleTest ()
147                 {
148                         string[] DataGrid_want = {
149                                 "ContainerControl=False",
150                                 "UserPaint=True",
151                                 "Opaque=False",
152                                 "ResizeRedraw=False",
153                                 "FixedWidth=False",
154                                 "FixedHeight=False",
155                                 "StandardClick=True",
156                                 "Selectable=True",
157                                 "UserMouse=True",
158                                 "SupportsTransparentBackColor=False",
159                                 "StandardDoubleClick=True",
160                                 "AllPaintingInWmPaint=True",
161                                 "CacheText=False",
162                                 "EnableNotifyMessage=False",
163                                 "DoubleBuffer=False"
164                         };
165
166                         Assert.AreEqual(DataGrid_want, GetStyles(new DataGrid()), "DataGridStyles");
167                 }
168
169
170                 [Test]
171                 public void DateTimePickerStyleTest ()
172                 {
173                         string[] DateTimePicker_want = {
174                                 "ContainerControl=False",
175                                 "UserPaint=False",
176                                 "Opaque=False",
177                                 "ResizeRedraw=False",
178                                 "FixedWidth=False",
179                                 "FixedHeight=True",
180                                 "StandardClick=False",
181                                 "Selectable=True",
182                                 "UserMouse=False",
183                                 "SupportsTransparentBackColor=False",
184                                 "StandardDoubleClick=True",
185                                 "AllPaintingInWmPaint=True",
186                                 "CacheText=False",
187                                 "EnableNotifyMessage=False",
188                                 "DoubleBuffer=False"
189                         };
190
191                         Assert.AreEqual(DateTimePicker_want, GetStyles(new DateTimePicker()), "DateTimePickerStyles");
192                 }
193
194
195                 [Test]
196                 public void GroupBoxStyleTest ()
197                 {
198                         string[] GroupBox_want = {
199                                 "ContainerControl=True",
200                                 "UserPaint=True",
201                                 "Opaque=False",
202                                 "ResizeRedraw=True",
203                                 "FixedWidth=False",
204                                 "FixedHeight=False",
205                                 "StandardClick=True",
206                                 "Selectable=False",
207                                 "UserMouse=False",
208                                 "SupportsTransparentBackColor=True",
209                                 "StandardDoubleClick=True",
210                                 "AllPaintingInWmPaint=True",
211                                 "CacheText=False",
212                                 "EnableNotifyMessage=False",
213                                 "DoubleBuffer=False"
214                         };
215
216                         Assert.AreEqual(GroupBox_want, GetStyles(new GroupBox()), "GroupBoxStyles");
217                 }
218
219
220                 [Test]
221                 public void LabelStyleTest ()
222                 {
223                         string[] Label_want = {
224                                 "ContainerControl=False",
225                                 "UserPaint=True",
226                                 "Opaque=False",
227                                 "ResizeRedraw=True",
228                                 "FixedWidth=False",
229                                 "FixedHeight=False",
230                                 "StandardClick=True",
231                                 "Selectable=False",
232                                 "UserMouse=False",
233                                 "SupportsTransparentBackColor=True",
234                                 "StandardDoubleClick=True",
235                                 "AllPaintingInWmPaint=True",
236                                 "CacheText=False",
237                                 "EnableNotifyMessage=False",
238                                 "DoubleBuffer=True"
239                         };
240
241                         Assert.AreEqual(Label_want, GetStyles(new Label()), "LabelStyles");
242                 }
243
244
245                 [Test]
246                 public void LinkLabelStyleTest ()
247                 {
248                         string[] LinkLabel_want = {
249                                 "ContainerControl=False",
250                                 "UserPaint=True",
251                                 "Opaque=True",
252                                 "ResizeRedraw=True",
253                                 "FixedWidth=False",
254                                 "FixedHeight=False",
255                                 "StandardClick=True",
256                                 "Selectable=False",
257                                 "UserMouse=False",
258                                 "SupportsTransparentBackColor=True",
259                                 "StandardDoubleClick=True",
260                                 "AllPaintingInWmPaint=True",
261                                 "CacheText=False",
262                                 "EnableNotifyMessage=False",
263                                 "DoubleBuffer=True"
264                         };
265
266                         string[] LinkLabel_link_want = {
267                                 "ContainerControl=False",
268                                 "UserPaint=True",
269                                 "Opaque=True",
270                                 "ResizeRedraw=True",
271                                 "FixedWidth=False",
272                                 "FixedHeight=False",
273                                 "StandardClick=True",
274                                 "Selectable=True",
275                                 "UserMouse=False",
276                                 "SupportsTransparentBackColor=True",
277                                 "StandardDoubleClick=True",
278                                 "AllPaintingInWmPaint=True",
279                                 "CacheText=False",
280                                 "EnableNotifyMessage=False",
281                                 "DoubleBuffer=True"
282                         };
283
284
285                         Assert.AreEqual(LinkLabel_want, GetStyles(new LinkLabel()), "LinkLabelStyles");
286
287                         // Test LinkLabel with a link
288                         LinkLabel link = new LinkLabel();
289                         link.Text = "Users need not fear making the switch to Linux";
290                         link.Links.Add (6,9, "http://link1");
291                         Assert.AreEqual(LinkLabel_link_want, GetStyles(link), "LinkLabelStyles2");
292
293                 }
294
295
296                 [Test]
297                 public void ComboBoxStyleTest ()
298                 {
299                         string[] ComboBox_want = {
300                                 "ContainerControl=False",
301                                 "UserPaint=False",
302                                 "Opaque=False",
303                                 "ResizeRedraw=False",
304                                 "FixedWidth=False",
305                                 "FixedHeight=False",
306                                 "StandardClick=False",
307                                 "Selectable=True",
308                                 "UserMouse=False",
309                                 "SupportsTransparentBackColor=False",
310                                 "StandardDoubleClick=True",
311                                 "AllPaintingInWmPaint=True",
312                                 "CacheText=False",
313                                 "EnableNotifyMessage=False",
314                                 "DoubleBuffer=False"
315                         };
316
317                         Assert.AreEqual(ComboBox_want, GetStyles(new ComboBox()), "ComboBoxStyles");
318                 }
319
320
321                 [Test]
322                 public void ListBoxStyleTest ()
323                 {
324                         string[] ListBox_want = {
325                                 "ContainerControl=False",
326                                 "UserPaint=False",
327                                 "Opaque=False",
328                                 "ResizeRedraw=False",
329                                 "FixedWidth=False",
330                                 "FixedHeight=False",
331                                 "StandardClick=False",
332                                 "Selectable=True",
333                                 "UserMouse=False",
334                                 "SupportsTransparentBackColor=False",
335                                 "StandardDoubleClick=True",
336                                 "AllPaintingInWmPaint=True",
337                                 "CacheText=False",
338                                 "EnableNotifyMessage=False",
339                                 "DoubleBuffer=False"
340                         };
341
342                         Assert.AreEqual(ListBox_want, GetStyles(new ListBox()), "ListBoxStyles");
343                 }
344
345
346                 [Test]
347                 public void CheckedListBoxStyleTest ()
348                 {
349                         string[] CheckedListBox_want = {
350                                 "ContainerControl=False",
351                                 "UserPaint=False",
352                                 "Opaque=False",
353                                 "ResizeRedraw=True",
354                                 "FixedWidth=False",
355                                 "FixedHeight=False",
356                                 "StandardClick=False",
357                                 "Selectable=True",
358                                 "UserMouse=False",
359                                 "SupportsTransparentBackColor=False",
360                                 "StandardDoubleClick=True",
361                                 "AllPaintingInWmPaint=True",
362                                 "CacheText=False",
363                                 "EnableNotifyMessage=False",
364                                 "DoubleBuffer=False"
365                         };
366
367                         Assert.AreEqual(CheckedListBox_want, GetStyles(new CheckedListBox()), "CheckedListBoxStyles");
368                 }
369
370
371                 [Test]
372                 public void ListViewStyleTest ()
373                 {
374                         string[] ListView_want = {
375                                 "ContainerControl=False",
376                                 "UserPaint=False",
377                                 "Opaque=False",
378                                 "ResizeRedraw=False",
379                                 "FixedWidth=False",
380                                 "FixedHeight=False",
381                                 "StandardClick=False",
382                                 "Selectable=True",
383                                 "UserMouse=False",
384                                 "SupportsTransparentBackColor=False",
385                                 "StandardDoubleClick=True",
386                                 "AllPaintingInWmPaint=True",
387                                 "CacheText=False",
388                                 "EnableNotifyMessage=False",
389                                 "DoubleBuffer=False"
390                         };
391
392                         Assert.AreEqual(ListView_want, GetStyles(new ListView()), "ListViewStyles");
393                 }
394
395
396                 [Test]
397                 public void MdiClientStyleTest ()
398                 {
399                         string[] MdiClient_want = {
400                                 "ContainerControl=False",
401                                 "UserPaint=True",
402                                 "Opaque=False",
403                                 "ResizeRedraw=False",
404                                 "FixedWidth=False",
405                                 "FixedHeight=False",
406                                 "StandardClick=True",
407                                 "Selectable=False",
408                                 "UserMouse=False",
409                                 "SupportsTransparentBackColor=False",
410                                 "StandardDoubleClick=True",
411                                 "AllPaintingInWmPaint=True",
412                                 "CacheText=False",
413                                 "EnableNotifyMessage=False",
414                                 "DoubleBuffer=False"
415                         };
416
417                         Assert.AreEqual(MdiClient_want, GetStyles(new MdiClient()), "MdiClientStyles");
418                 }
419
420
421                 [Test]
422                 public void MonthCalendarStyleTest ()
423                 {
424                         string[] MonthCalendar_want = {
425                                 "ContainerControl=False",
426                                 "UserPaint=False",
427                                 "Opaque=False",
428                                 "ResizeRedraw=False",
429                                 "FixedWidth=False",
430                                 "FixedHeight=False",
431                                 "StandardClick=False",
432                                 "Selectable=True",
433                                 "UserMouse=False",
434                                 "SupportsTransparentBackColor=False",
435                                 "StandardDoubleClick=True",
436                                 "AllPaintingInWmPaint=True",
437                                 "CacheText=False",
438                                 "EnableNotifyMessage=False",
439                                 "DoubleBuffer=False"
440                         };
441
442                         Assert.AreEqual(MonthCalendar_want, GetStyles(new MonthCalendar()), "MonthCalendarStyles");
443                 }
444
445
446                 [Test]
447                 public void PictureBoxStyleTest ()
448                 {
449                         string[] PictureBox_want = {
450                                 "ContainerControl=False",
451                                 "UserPaint=True",
452                                 "Opaque=False",
453                                 "ResizeRedraw=False",
454                                 "FixedWidth=False",
455                                 "FixedHeight=False",
456                                 "StandardClick=True",
457                                 "Selectable=False",
458                                 "UserMouse=False",
459                                 "SupportsTransparentBackColor=True",
460                                 "StandardDoubleClick=True",
461                                 "AllPaintingInWmPaint=True",
462                                 "CacheText=False",
463                                 "EnableNotifyMessage=False",
464                                 "DoubleBuffer=True"
465                         };
466
467                         Assert.AreEqual(PictureBox_want, GetStyles(new PictureBox()), "PictureBoxStyles");
468                 }
469
470
471                 [Test]
472                 public void ProgressBarStyleTest ()
473                 {
474                         string[] ProgressBar_want = {
475                                 "ContainerControl=False",
476                                 "UserPaint=False",
477                                 "Opaque=False",
478                                 "ResizeRedraw=False",
479                                 "FixedWidth=False",
480                                 "FixedHeight=False",
481                                 "StandardClick=True",
482                                 "Selectable=False",
483                                 "UserMouse=False",
484                                 "SupportsTransparentBackColor=False",
485                                 "StandardDoubleClick=True",
486                                 "AllPaintingInWmPaint=True",
487                                 "CacheText=False",
488                                 "EnableNotifyMessage=False",
489                                 "DoubleBuffer=False"
490                         };
491
492                         Assert.AreEqual(ProgressBar_want, GetStyles(new ProgressBar()), "ProgressBarStyles");
493                 }
494
495
496                 [Test]
497                 public void ScrollableControlStyleTest ()
498                 {
499                         string[] ScrollableControl_want = {
500                                 "ContainerControl=True",
501                                 "UserPaint=True",
502                                 "Opaque=False",
503                                 "ResizeRedraw=False",
504                                 "FixedWidth=False",
505                                 "FixedHeight=False",
506                                 "StandardClick=True",
507                                 "Selectable=True",
508                                 "UserMouse=False",
509                                 "SupportsTransparentBackColor=False",
510                                 "StandardDoubleClick=True",
511                                 "AllPaintingInWmPaint=False",
512                                 "CacheText=False",
513                                 "EnableNotifyMessage=False",
514                                 "DoubleBuffer=False"
515                         };
516
517                         Assert.AreEqual(ScrollableControl_want, GetStyles(new ScrollableControl()), "ScrollableControlStyles");
518                 }
519
520
521                 [Test]
522                 public void ContainerControlStyleTest ()
523                 {
524                         string[] ContainerControl_want = {
525                                 "ContainerControl=True",
526                                 "UserPaint=True",
527                                 "Opaque=False",
528                                 "ResizeRedraw=False",
529                                 "FixedWidth=False",
530                                 "FixedHeight=False",
531                                 "StandardClick=True",
532                                 "Selectable=True",
533                                 "UserMouse=False",
534                                 "SupportsTransparentBackColor=False",
535                                 "StandardDoubleClick=True",
536                                 "AllPaintingInWmPaint=False",
537                                 "CacheText=False",
538                                 "EnableNotifyMessage=False",
539                                 "DoubleBuffer=False"
540                         };
541
542                         Assert.AreEqual(ContainerControl_want, GetStyles(new ContainerControl()), "ContainerControlStyles");
543                 }
544
545
546                 [Test]
547                 public void FormStyleTest ()
548                 {
549                         string[] Form_want = {
550                                 "ContainerControl=True",
551                                 "UserPaint=True",
552                                 "Opaque=False",
553                                 "ResizeRedraw=False",
554                                 "FixedWidth=False",
555                                 "FixedHeight=False",
556                                 "StandardClick=True",
557                                 "Selectable=True",
558                                 "UserMouse=False",
559                                 "SupportsTransparentBackColor=False",
560                                 "StandardDoubleClick=True",
561                                 "AllPaintingInWmPaint=False",
562                                 "CacheText=False",
563                                 "EnableNotifyMessage=False",
564                                 "DoubleBuffer=False"
565                         };
566
567                         Assert.AreEqual(Form_want, GetStyles(new Form()), "FormStyles");
568                 }
569
570
571                 [Test]
572                 public void PropertyGridStyleTest ()
573                 {
574                         string[] PropertyGrid_want = {
575                                 "ContainerControl=True",
576                                 "UserPaint=True",
577                                 "Opaque=False",
578                                 "ResizeRedraw=False",
579                                 "FixedWidth=False",
580                                 "FixedHeight=False",
581                                 "StandardClick=True",
582                                 "Selectable=True",
583                                 "UserMouse=False",
584                                 "SupportsTransparentBackColor=False",
585                                 "StandardDoubleClick=True",
586                                 "AllPaintingInWmPaint=False",
587                                 "CacheText=False",
588                                 "EnableNotifyMessage=False",
589                                 "DoubleBuffer=False"
590                         };
591
592                         Assert.AreEqual(PropertyGrid_want, GetStyles(new PropertyGrid()), "PropertyGridStyles");
593                 }
594
595
596                 [Test]
597                 public void DomainUpDownStyleTest ()
598                 {
599                         string[] DomainUpDown_want = {
600                                 "ContainerControl=True",
601                                 "UserPaint=True",
602                                 "Opaque=False",
603                                 "ResizeRedraw=False",
604                                 "FixedWidth=False",
605                                 "FixedHeight=True",
606                                 "StandardClick=True",
607                                 "Selectable=True",
608                                 "UserMouse=False",
609                                 "SupportsTransparentBackColor=False",
610                                 "StandardDoubleClick=True",
611                                 "AllPaintingInWmPaint=False",
612                                 "CacheText=False",
613                                 "EnableNotifyMessage=False",
614                                 "DoubleBuffer=False"
615                         };
616
617                         Assert.AreEqual(DomainUpDown_want, GetStyles(new DomainUpDown()), "DomainUpDownStyles");
618                 }
619
620
621                 [Test]
622                 public void NumericUpDownStyleTest ()
623                 {
624                         string[] NumericUpDown_want = {
625                                 "ContainerControl=True",
626                                 "UserPaint=True",
627                                 "Opaque=False",
628                                 "ResizeRedraw=False",
629                                 "FixedWidth=False",
630                                 "FixedHeight=True",
631                                 "StandardClick=True",
632                                 "Selectable=True",
633                                 "UserMouse=False",
634                                 "SupportsTransparentBackColor=False",
635                                 "StandardDoubleClick=True",
636                                 "AllPaintingInWmPaint=False",
637                                 "CacheText=False",
638                                 "EnableNotifyMessage=False",
639                                 "DoubleBuffer=False"
640                         };
641
642                         Assert.AreEqual(NumericUpDown_want, GetStyles(new NumericUpDown()), "NumericUpDownStyles");
643                 }
644
645
646                 [Test]
647                 public void UserControlStyleTest ()
648                 {
649                         string[] UserControl_want = {
650                                 "ContainerControl=True",
651                                 "UserPaint=True",
652                                 "Opaque=False",
653                                 "ResizeRedraw=False",
654                                 "FixedWidth=False",
655                                 "FixedHeight=False",
656                                 "StandardClick=True",
657                                 "Selectable=True",
658                                 "UserMouse=False",
659                                 "SupportsTransparentBackColor=False",
660                                 "StandardDoubleClick=True",
661                                 "AllPaintingInWmPaint=False",
662                                 "CacheText=False",
663                                 "EnableNotifyMessage=False",
664                                 "DoubleBuffer=False"
665                         };
666
667                         Assert.AreEqual(UserControl_want, GetStyles(new UserControl()), "UserControlStyles");
668                 }
669
670
671                 [Test]
672                 public void PanelStyleTest ()
673                 {
674                         string[] Panel_want = {
675                                 "ContainerControl=True",
676                                 "UserPaint=True",
677                                 "Opaque=False",
678                                 "ResizeRedraw=False",
679                                 "FixedWidth=False",
680                                 "FixedHeight=False",
681                                 "StandardClick=True",
682                                 "Selectable=False",
683                                 "UserMouse=False",
684                                 "SupportsTransparentBackColor=True",
685                                 "StandardDoubleClick=True",
686                                 "AllPaintingInWmPaint=False",
687                                 "CacheText=False",
688                                 "EnableNotifyMessage=False",
689                                 "DoubleBuffer=False"
690                         };
691
692                         Assert.AreEqual(Panel_want, GetStyles(new Panel()), "PanelStyles");
693                 }
694
695
696                 [Test]
697                 public void TabPageStyleTest ()
698                 {
699                         string[] TabPage_want = {
700                                 "ContainerControl=True",
701                                 "UserPaint=True",
702                                 "Opaque=False",
703                                 "ResizeRedraw=False",
704                                 "FixedWidth=False",
705                                 "FixedHeight=False",
706                                 "StandardClick=True",
707                                 "Selectable=False",
708                                 "UserMouse=False",
709                                 "SupportsTransparentBackColor=True",
710                                 "StandardDoubleClick=True",
711                                 "AllPaintingInWmPaint=False",
712                                 "CacheText=True",
713                                 "EnableNotifyMessage=False",
714                                 "DoubleBuffer=False"
715                         };
716
717                         Assert.AreEqual(TabPage_want, GetStyles(new TabPage()), "TabPageStyles");
718                 }
719
720
721                 [Test]
722                 public void HScrollBarStyleTest ()
723                 {
724                         string[] HScrollBar_want = {
725                                 "ContainerControl=False",
726                                 "UserPaint=False",
727                                 "Opaque=False",
728                                 "ResizeRedraw=False",
729                                 "FixedWidth=False",
730                                 "FixedHeight=False",
731                                 "StandardClick=False",
732                                 "Selectable=True",
733                                 "UserMouse=False",
734                                 "SupportsTransparentBackColor=False",
735                                 "StandardDoubleClick=True",
736                                 "AllPaintingInWmPaint=True",
737                                 "CacheText=False",
738                                 "EnableNotifyMessage=False",
739                                 "DoubleBuffer=False"
740                         };
741
742                         Assert.AreEqual(HScrollBar_want, GetStyles(new HScrollBar()), "HScrollBarStyles");
743                 }
744
745
746                 [Test]
747                 public void VScrollBarStyleTest ()
748                 {
749                         string[] VScrollBar_want = {
750                                 "ContainerControl=False",
751                                 "UserPaint=False",
752                                 "Opaque=False",
753                                 "ResizeRedraw=False",
754                                 "FixedWidth=False",
755                                 "FixedHeight=False",
756                                 "StandardClick=False",
757                                 "Selectable=True",
758                                 "UserMouse=False",
759                                 "SupportsTransparentBackColor=False",
760                                 "StandardDoubleClick=True",
761                                 "AllPaintingInWmPaint=True",
762                                 "CacheText=False",
763                                 "EnableNotifyMessage=False",
764                                 "DoubleBuffer=False"
765                         };
766
767                         Assert.AreEqual(VScrollBar_want, GetStyles(new VScrollBar()), "VScrollBarStyles");
768                 }
769
770
771                 [Test]
772                 public void SplitterStyleTest ()
773                 {
774                         string[] Splitter_want = {
775                                 "ContainerControl=False",
776                                 "UserPaint=True",
777                                 "Opaque=False",
778                                 "ResizeRedraw=False",
779                                 "FixedWidth=False",
780                                 "FixedHeight=False",
781                                 "StandardClick=True",
782                                 "Selectable=False",
783                                 "UserMouse=False",
784                                 "SupportsTransparentBackColor=False",
785                                 "StandardDoubleClick=True",
786                                 "AllPaintingInWmPaint=True",
787                                 "CacheText=False",
788                                 "EnableNotifyMessage=False",
789                                 "DoubleBuffer=False"
790                         };
791
792                         Assert.AreEqual(Splitter_want, GetStyles(new Splitter()), "SplitterStyles");
793                 }
794
795
796                 [Test]
797                 public void StatusBarStyleTest ()
798                 {
799                         string[] StatusBar_want = {
800                                 "ContainerControl=False",
801                                 "UserPaint=False",
802                                 "Opaque=False",
803                                 "ResizeRedraw=False",
804                                 "FixedWidth=False",
805                                 "FixedHeight=False",
806                                 "StandardClick=True",
807                                 "Selectable=False",
808                                 "UserMouse=False",
809                                 "SupportsTransparentBackColor=False",
810                                 "StandardDoubleClick=True",
811                                 "AllPaintingInWmPaint=True",
812                                 "CacheText=False",
813                                 "EnableNotifyMessage=False",
814                                 "DoubleBuffer=False"
815                         };
816
817                         Assert.AreEqual(StatusBar_want, GetStyles(new StatusBar()), "StatusBarStyles");
818                 }
819
820
821                 [Test]
822                 public void TabControlStyleTest ()
823                 {
824                         string[] TabControl_want = {
825                                 "ContainerControl=False",
826                                 "UserPaint=False",
827                                 "Opaque=False",
828                                 "ResizeRedraw=False",
829                                 "FixedWidth=False",
830                                 "FixedHeight=False",
831                                 "StandardClick=True",
832                                 "Selectable=True",
833                                 "UserMouse=False",
834                                 "SupportsTransparentBackColor=False",
835                                 "StandardDoubleClick=True",
836                                 "AllPaintingInWmPaint=True",
837                                 "CacheText=False",
838                                 "EnableNotifyMessage=False",
839                                 "DoubleBuffer=False"
840                         };
841
842                         Assert.AreEqual(TabControl_want, GetStyles(new TabControl()), "TabControlStyles");
843                 }
844
845
846                 [Test]
847                 public void RichTextBoxStyleTest ()
848                 {
849                         string[] RichTextBox_want = {
850                                 "ContainerControl=False",
851                                 "UserPaint=False",
852                                 "Opaque=False",
853                                 "ResizeRedraw=False",
854                                 "FixedWidth=False",
855                                 "FixedHeight=False",
856                                 "StandardClick=False",
857                                 "Selectable=True",
858                                 "UserMouse=False",
859                                 "SupportsTransparentBackColor=False",
860                                 "StandardDoubleClick=True",
861                                 "AllPaintingInWmPaint=True",
862                                 "CacheText=False",
863                                 "EnableNotifyMessage=False",
864                                 "DoubleBuffer=False"
865                         };
866
867                         Assert.AreEqual(RichTextBox_want, GetStyles(new RichTextBox()), "RichTextBoxStyles");
868                 }
869
870
871                 [Test]
872                 public void TextBoxStyleTest ()
873                 {
874                         string[] TextBox_want = {
875                                 "ContainerControl=False",
876                                 "UserPaint=False",
877                                 "Opaque=False",
878                                 "ResizeRedraw=False",
879                                 "FixedWidth=False",
880                                 "FixedHeight=True",
881                                 "StandardClick=False",
882                                 "Selectable=True",
883                                 "UserMouse=False",
884                                 "SupportsTransparentBackColor=False",
885                                 "StandardDoubleClick=False",
886                                 "AllPaintingInWmPaint=True",
887                                 "CacheText=False",
888                                 "EnableNotifyMessage=False",
889                                 "DoubleBuffer=False"
890                         };
891
892                         Assert.AreEqual(TextBox_want, GetStyles(new TextBox()), "TextBoxStyles");
893                 }
894
895
896                 [Test]
897                 public void DataGridTextBoxStyleTest ()
898                 {
899                         string[] DataGridTextBox_want = {
900                                 "ContainerControl=False",
901                                 "UserPaint=False",
902                                 "Opaque=False",
903                                 "ResizeRedraw=False",
904                                 "FixedWidth=False",
905                                 "FixedHeight=True",
906                                 "StandardClick=False",
907                                 "Selectable=True",
908                                 "UserMouse=False",
909                                 "SupportsTransparentBackColor=False",
910                                 "StandardDoubleClick=False",
911                                 "AllPaintingInWmPaint=True",
912                                 "CacheText=False",
913                                 "EnableNotifyMessage=False",
914                                 "DoubleBuffer=False"
915                         };
916
917                         Assert.AreEqual(DataGridTextBox_want, GetStyles(new DataGridTextBox()), "DataGridTextBoxStyles");
918                 }
919
920
921                 [Test]
922                 public void ToolBarStyleTest ()
923                 {
924                         string[] ToolBar_want = {
925                                 "ContainerControl=False",
926                                 "UserPaint=False",
927                                 "Opaque=False",
928                                 "ResizeRedraw=False",
929                                 "FixedWidth=False",
930                                 "FixedHeight=True",
931                                 "StandardClick=True",
932                                 "Selectable=True",
933                                 "UserMouse=False",
934                                 "SupportsTransparentBackColor=False",
935                                 "StandardDoubleClick=True",
936                                 "AllPaintingInWmPaint=True",
937                                 "CacheText=False",
938                                 "EnableNotifyMessage=False",
939                                 "DoubleBuffer=False"
940                         };
941
942                         Assert.AreEqual(ToolBar_want, GetStyles(new ToolBar()), "ToolBarStyles");
943                 }
944
945
946                 [Test]
947                 public void TrackBarStyleTest ()
948                 {
949                         string[] TrackBar_want = {
950                                 "ContainerControl=False",
951                                 "UserPaint=False",
952                                 "Opaque=False",
953                                 "ResizeRedraw=False",
954                                 "FixedWidth=False",
955                                 "FixedHeight=False",
956                                 "StandardClick=True",
957                                 "Selectable=True",
958                                 "UserMouse=False",
959                                 "SupportsTransparentBackColor=False",
960                                 "StandardDoubleClick=True",
961                                 "AllPaintingInWmPaint=True",
962                                 "CacheText=False",
963                                 "EnableNotifyMessage=False",
964                                 "DoubleBuffer=False"
965                         };
966
967                         Assert.AreEqual(TrackBar_want, GetStyles(new TrackBar()), "TrackBarStyles");
968                 }
969
970
971                 [Test]
972                 public void TreeViewStyleTest ()
973                 {
974                         string[] TreeView_want = {
975                                 "ContainerControl=False",
976                                 "UserPaint=False",
977                                 "Opaque=False",
978                                 "ResizeRedraw=False",
979                                 "FixedWidth=False",
980                                 "FixedHeight=False",
981                                 "StandardClick=False",
982                                 "Selectable=True",
983                                 "UserMouse=False",
984                                 "SupportsTransparentBackColor=False",
985                                 "StandardDoubleClick=True",
986                                 "AllPaintingInWmPaint=True",
987                                 "CacheText=False",
988                                 "EnableNotifyMessage=False",
989                                 "DoubleBuffer=False"
990                         };
991
992                         Assert.AreEqual(TreeView_want, GetStyles(new TreeView()), "TreeViewStyles");
993                 }
994
995
996         }
997 }
998