New test.
[mono.git] / mcs / class / System.Drawing / Test / System.Drawing / TestPens.cs
1 // Tests for System.Drawing.Pens.cs
2 //
3 // Author:
4 //     Ravindra (rkumar@novell.com)
5 //
6
7 //
8 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 // 
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 // 
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29
30
31 using NUnit.Framework;
32 using System;
33 using System.Drawing;
34 using System.Drawing.Drawing2D;
35 using System.Security.Permissions;
36
37 namespace MonoTests.System.Drawing
38 {
39         [TestFixture]
40         [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
41         public class PensTest : Assertion
42         {
43                 [SetUp]
44                 public void SetUp () { }
45
46                 [TearDown]
47                 public void TearDown () { }
48                 
49                 [Test]
50                 public void TestEquals ()
51                 {
52                         Pen pen1 = Pens.Blue;
53                         Pen pen2 = Pens.Blue;
54                         
55                         AssertEquals ("Equals", true, pen1.Equals (pen2));                      
56                 }
57
58                 [Test]
59                 public void TestAliceBlue ()
60                 {
61                         Pen pen = Pens.AliceBlue;
62                         AssertEquals ("P1#1", pen.PenType, PenType.SolidColor);
63                         AssertEquals ("P1#2", pen.Color, Color.AliceBlue);
64
65                         try {
66                                 pen.Color = Color.AliceBlue;
67                                 Fail ("P1#3: must throw ArgumentException");
68                         } catch (ArgumentException) {
69                                 Assert ("P1#3", true);
70                         }
71                 }
72
73                 [Test]
74                 public void TestAntiqueWhite ()
75                 {
76                         Pen pen = Pens.AntiqueWhite;
77                         AssertEquals ("P2#1", pen.PenType, PenType.SolidColor);
78                         AssertEquals ("P2#2", pen.Color, Color.AntiqueWhite);
79
80                         try {
81                                 pen.Color = Color.AntiqueWhite;
82                                 Fail ("P2#3: must throw ArgumentException");
83                         } catch (ArgumentException) {
84                                 Assert ("P2#3", true);
85                         }
86                 }
87
88                 [Test]
89                 public void TestAqua ()
90                 {
91                         Pen pen = Pens.Aqua;
92                         AssertEquals ("P3#1", pen.PenType, PenType.SolidColor);
93                         AssertEquals ("P3#2", pen.Color, Color.Aqua);
94
95                         try {
96                                 pen.Color = Color.Aqua;
97                                 Fail ("P3#3: must throw ArgumentException");
98                         } catch (ArgumentException) {
99                                 Assert ("P3#3", true);
100                         }
101                 }
102
103                 [Test]
104                 public void TestAquamarine ()
105                 {
106                         Pen pen = Pens.Aquamarine;
107                         AssertEquals ("P4#1", pen.PenType, PenType.SolidColor);
108                         AssertEquals ("P4#2", pen.Color, Color.Aquamarine);
109
110                         try {
111                                 pen.Color = Color.Aquamarine;
112                                 Fail ("P4#3: must throw ArgumentException");
113                         } catch (ArgumentException) {
114                                 Assert ("P4#3", true);
115                         }
116                 }
117
118                 [Test]
119                 public void TestAzure ()
120                 {
121                         Pen pen = Pens.Azure;
122                         AssertEquals ("P5#1", pen.PenType, PenType.SolidColor);
123                         AssertEquals ("P5#2", pen.Color, Color.Azure);
124
125                         try {
126                                 pen.Color = Color.Azure;
127                                 Fail ("P5#3: must throw ArgumentException");
128                         } catch (ArgumentException) {
129                                 Assert ("P5#3", true);
130                         }
131                 }
132
133                 [Test]
134                 public void TestBeige ()
135                 {
136                         Pen pen = Pens.Beige;
137                         AssertEquals ("P6#1", pen.PenType, PenType.SolidColor);
138                         AssertEquals ("P6#2", pen.Color, Color.Beige);
139
140                         try {
141                                 pen.Color = Color.Beige;
142                                 Fail ("P6#3: must throw ArgumentException");
143                         } catch (ArgumentException) {
144                                 Assert ("P6#3", true);
145                         }
146                 }
147
148                 [Test]
149                 public void TestBisque ()
150                 {
151                         Pen pen = Pens.Bisque;
152                         AssertEquals ("P7#1", pen.PenType, PenType.SolidColor);
153                         AssertEquals ("P7#2", pen.Color, Color.Bisque);
154
155                         try {
156                                 pen.Color = Color.Bisque;
157                                 Fail ("P7#3: must throw ArgumentException");
158                         } catch (ArgumentException) {
159                                 Assert ("P7#3", true);
160                         }
161                 }
162
163                 [Test]
164                 public void TestBlack ()
165                 {
166                         Pen pen = Pens.Black;
167                         AssertEquals ("P8#1", pen.PenType, PenType.SolidColor);
168                         AssertEquals ("P8#2", pen.Color, Color.Black);
169
170                         try {
171                                 pen.Color = Color.Black;
172                                 Fail ("P8#3: must throw ArgumentException");
173                         } catch (ArgumentException) {
174                                 Assert ("P8#3", true);
175                         }
176                 }
177
178                 [Test]
179                 public void TestBlanchedAlmond ()
180                 {
181                         Pen pen = Pens.BlanchedAlmond;
182                         AssertEquals ("P9#1", pen.PenType, PenType.SolidColor);
183                         AssertEquals ("P9#2", pen.Color, Color.BlanchedAlmond);
184
185                         try {
186                                 pen.Color = Color.BlanchedAlmond;
187                                 Fail ("P9#3: must throw ArgumentException");
188                         } catch (ArgumentException) {
189                                 Assert ("P9#3", true);
190                         }
191                 }
192
193                 [Test]
194                 public void TestBlue ()
195                 {
196                         Pen pen = Pens.Blue;
197                         AssertEquals ("P10#1", pen.PenType, PenType.SolidColor);
198                         AssertEquals ("P10#2", pen.Color, Color.Blue);
199
200                         try {
201                                 pen.Color = Color.Blue;
202                                 Fail ("P10#3: must throw ArgumentException");
203                         } catch (ArgumentException) {
204                                 Assert ("P10#3", true);
205                         }
206                 }
207
208                 [Test]
209                 public void TestBlueViolet ()
210                 {
211                         Pen pen = Pens.BlueViolet;
212                         AssertEquals ("P11#1", pen.PenType, PenType.SolidColor);
213                         AssertEquals ("P11#2", pen.Color, Color.BlueViolet);
214
215                         try {
216                                 pen.Color = Color.BlueViolet;
217                                 Fail ("P11#3: must throw ArgumentException");
218                         } catch (ArgumentException) {
219                                 Assert ("P11#3", true);
220                         }
221                 }
222
223                 [Test]
224                 public void TestBrown ()
225                 {
226                         Pen pen = Pens.Brown;
227                         AssertEquals ("P12#1", pen.PenType, PenType.SolidColor);
228                         AssertEquals ("P12#2", pen.Color, Color.Brown);
229
230                         try {
231                                 pen.Color = Color.Brown;
232                                 Fail ("P12#3: must throw ArgumentException");
233                         } catch (ArgumentException) {
234                                 Assert ("P12#3", true);
235                         }
236                 }
237
238                 [Test]
239                 public void TestBurlyWood ()
240                 {
241                         Pen pen = Pens.BurlyWood;
242                         AssertEquals ("P13#1", pen.PenType, PenType.SolidColor);
243                         AssertEquals ("P13#2", pen.Color, Color.BurlyWood);
244
245                         try {
246                                 pen.Color = Color.BurlyWood;
247                                 Fail ("P13#3: must throw ArgumentException");
248                         } catch (ArgumentException) {
249                                 Assert ("P13#3", true);
250                         }
251                 }
252
253                 [Test]
254                 public void TestCadetBlue ()
255                 {
256                         Pen pen = Pens.CadetBlue;
257                         AssertEquals ("P14#1", pen.PenType, PenType.SolidColor);
258                         AssertEquals ("P14#2", pen.Color, Color.CadetBlue);
259
260                         try {
261                                 pen.Color = Color.CadetBlue;
262                                 Fail ("P14#3: must throw ArgumentException");
263                         } catch (ArgumentException) {
264                                 Assert ("P14#3", true);
265                         }
266                 }
267
268                 [Test]
269                 public void TestChartreuse ()
270                 {
271                         Pen pen = Pens.Chartreuse;
272                         AssertEquals ("P15#1", pen.PenType, PenType.SolidColor);
273                         AssertEquals ("P15#2", pen.Color, Color.Chartreuse);
274
275                         try {
276                                 pen.Color = Color.Chartreuse;
277                                 Fail ("P15#3: must throw ArgumentException");
278                         } catch (ArgumentException) {
279                                 Assert ("P15#3", true);
280                         }
281                 }
282
283                 [Test]
284                 public void TestChocolate ()
285                 {
286                         Pen pen = Pens.Chocolate;
287                         AssertEquals ("P16#1", pen.PenType, PenType.SolidColor);
288                         AssertEquals ("P16#2", pen.Color, Color.Chocolate);
289
290                         try {
291                                 pen.Color = Color.Chocolate;
292                                 Fail ("P16#3: must throw ArgumentException");
293                         } catch (ArgumentException) {
294                                 Assert ("P16#3", true);
295                         }
296                 }
297
298                 [Test]
299                 public void TestCoral ()
300                 {
301                         Pen pen = Pens.Coral;
302                         AssertEquals ("P17#1", pen.PenType, PenType.SolidColor);
303                         AssertEquals ("P17#2", pen.Color, Color.Coral);
304
305                         try {
306                                 pen.Color = Color.Coral;
307                                 Fail ("P17#3: must throw ArgumentException");
308                         } catch (ArgumentException) {
309                                 Assert ("P17#3", true);
310                         }
311                 }
312
313                 [Test]
314                 public void TestCornflowerBlue ()
315                 {
316                         Pen pen = Pens.CornflowerBlue;
317                         AssertEquals ("P18#1", pen.PenType, PenType.SolidColor);
318                         AssertEquals ("P18#2", pen.Color, Color.CornflowerBlue);
319
320                         try {
321                                 pen.Color = Color.CornflowerBlue;
322                                 Fail ("P18#3: must throw ArgumentException");
323                         } catch (ArgumentException) {
324                                 Assert ("P18#3", true);
325                         }
326                 }
327
328                 [Test]
329                 public void TestCornsilk ()
330                 {
331                         Pen pen = Pens.Cornsilk;
332                         AssertEquals ("P19#1", pen.PenType, PenType.SolidColor);
333                         AssertEquals ("P19#2", pen.Color, Color.Cornsilk);
334
335                         try {
336                                 pen.Color = Color.Cornsilk;
337                                 Fail ("P19#3: must throw ArgumentException");
338                         } catch (ArgumentException) {
339                                 Assert ("P19#3", true);
340                         }
341                 }
342
343                 [Test]
344                 public void TestCrimson ()
345                 {
346                         Pen pen = Pens.Crimson;
347                         AssertEquals ("P20#1", pen.PenType, PenType.SolidColor);
348                         AssertEquals ("P20#2", pen.Color, Color.Crimson);
349
350                         try {
351                                 pen.Color = Color.Crimson;
352                                 Fail ("P20#3: must throw ArgumentException");
353                         } catch (ArgumentException) {
354                                 Assert ("P20#3", true);
355                         }
356                 }
357
358                 [Test]
359                 public void TestCyan ()
360                 {
361                         Pen pen = Pens.Cyan;
362                         AssertEquals ("P21#1", pen.PenType, PenType.SolidColor);
363                         AssertEquals ("P21#2", pen.Color, Color.Cyan);
364
365                         try {
366                                 pen.Color = Color.Cyan;
367                                 Fail ("P21#3: must throw ArgumentException");
368                         } catch (ArgumentException) {
369                                 Assert ("P21#3", true);
370                         }
371                 }
372
373                 [Test]
374                 public void TestDarkBlue ()
375                 {
376                         Pen pen = Pens.DarkBlue;
377                         AssertEquals ("P22#1", pen.PenType, PenType.SolidColor);
378                         AssertEquals ("P22#2", pen.Color, Color.DarkBlue);
379
380                         try {
381                                 pen.Color = Color.DarkBlue;
382                                 Fail ("P22#3: must throw ArgumentException");
383                         } catch (ArgumentException) {
384                                 Assert ("P22#3", true);
385                         }
386                 }
387
388                 [Test]
389                 public void TestDarkCyan ()
390                 {
391                         Pen pen = Pens.DarkCyan;
392                         AssertEquals ("P23#1", pen.PenType, PenType.SolidColor);
393                         AssertEquals ("P23#2", pen.Color, Color.DarkCyan);
394
395                         try {
396                                 pen.Color = Color.DarkCyan;
397                                 Fail ("P23#3: must throw ArgumentException");
398                         } catch (ArgumentException) {
399                                 Assert ("P23#3", true);
400                         }
401                 }
402
403                 [Test]
404                 public void TestDarkGoldenrod ()
405                 {
406                         Pen pen = Pens.DarkGoldenrod;
407                         AssertEquals ("P24#1", pen.PenType, PenType.SolidColor);
408                         AssertEquals ("P24#2", pen.Color, Color.DarkGoldenrod);
409
410                         try {
411                                 pen.Color = Color.DarkGoldenrod;
412                                 Fail ("P24#3: must throw ArgumentException");
413                         } catch (ArgumentException) {
414                                 Assert ("P24#3", true);
415                         }
416                 }
417
418                 [Test]
419                 public void TestDarkGray ()
420                 {
421                         Pen pen = Pens.DarkGray;
422                         AssertEquals ("P25#1", pen.PenType, PenType.SolidColor);
423                         AssertEquals ("P25#2", pen.Color, Color.DarkGray);
424
425                         try {
426                                 pen.Color = Color.DarkGray;
427                                 Fail ("P25#3: must throw ArgumentException");
428                         } catch (ArgumentException) {
429                                 Assert ("P25#3", true);
430                         }
431                 }
432
433                 [Test]
434                 public void TestDarkGreen ()
435                 {
436                         Pen pen = Pens.DarkGreen;
437                         AssertEquals ("P26#1", pen.PenType, PenType.SolidColor);
438                         AssertEquals ("P26#2", pen.Color, Color.DarkGreen);
439
440                         try {
441                                 pen.Color = Color.DarkGreen;
442                                 Fail ("P26#3: must throw ArgumentException");
443                         } catch (ArgumentException) {
444                                 Assert ("P26#3", true);
445                         }
446                 }
447
448                 [Test]
449                 public void TestDarkKhaki ()
450                 {
451                         Pen pen = Pens.DarkKhaki;
452                         AssertEquals ("P27#1", pen.PenType, PenType.SolidColor);
453                         AssertEquals ("P27#2", pen.Color, Color.DarkKhaki);
454
455                         try {
456                                 pen.Color = Color.DarkKhaki;
457                                 Fail ("P27#3: must throw ArgumentException");
458                         } catch (ArgumentException) {
459                                 Assert ("P27#3", true);
460                         }
461                 }
462
463                 [Test]
464                 public void TestDarkMagenta ()
465                 {
466                         Pen pen = Pens.DarkMagenta;
467                         AssertEquals ("P28#1", pen.PenType, PenType.SolidColor);
468                         AssertEquals ("P28#2", pen.Color, Color.DarkMagenta);
469
470                         try {
471                                 pen.Color = Color.DarkMagenta;
472                                 Fail ("P28#3: must throw ArgumentException");
473                         } catch (ArgumentException) {
474                                 Assert ("P28#3", true);
475                         }
476                 }
477
478                 [Test]
479                 public void TestDarkOliveGreen ()
480                 {
481                         Pen pen = Pens.DarkOliveGreen;
482                         AssertEquals ("P29#1", pen.PenType, PenType.SolidColor);
483                         AssertEquals ("P29#2", pen.Color, Color.DarkOliveGreen);
484
485                         try {
486                                 pen.Color = Color.DarkOliveGreen;
487                                 Fail ("P29#3: must throw ArgumentException");
488                         } catch (ArgumentException) {
489                                 Assert ("P29#3", true);
490                         }
491                 }
492
493                 [Test]
494                 public void TestDarkOrange ()
495                 {
496                         Pen pen = Pens.DarkOrange;
497                         AssertEquals ("P30#1", pen.PenType, PenType.SolidColor);
498                         AssertEquals ("P30#2", pen.Color, Color.DarkOrange);
499
500                         try {
501                                 pen.Color = Color.DarkOrange;
502                                 Fail ("P30#3: must throw ArgumentException");
503                         } catch (ArgumentException) {
504                                 Assert ("P30#3", true);
505                         }
506                 }
507
508                 [Test]
509                 public void TestDarkOrchid ()
510                 {
511                         Pen pen = Pens.DarkOrchid;
512                         AssertEquals ("P31#1", pen.PenType, PenType.SolidColor);
513                         AssertEquals ("P31#2", pen.Color, Color.DarkOrchid);
514
515                         try {
516                                 pen.Color = Color.DarkOrchid;
517                                 Fail ("P31#3: must throw ArgumentException");
518                         } catch (ArgumentException) {
519                                 Assert ("P31#3", true);
520                         }
521                 }
522
523                 [Test]
524                 public void TestDarkRed ()
525                 {
526                         Pen pen = Pens.DarkRed;
527                         AssertEquals ("P32#1", pen.PenType, PenType.SolidColor);
528                         AssertEquals ("P32#2", pen.Color, Color.DarkRed);
529
530                         try {
531                                 pen.Color = Color.DarkRed;
532                                 Fail ("P32#3: must throw ArgumentException");
533                         } catch (ArgumentException) {
534                                 Assert ("P32#3", true);
535                         }
536                 }
537
538                 [Test]
539                 public void TestDarkSalmon ()
540                 {
541                         Pen pen = Pens.DarkSalmon;
542                         AssertEquals ("P33#1", pen.PenType, PenType.SolidColor);
543                         AssertEquals ("P33#2", pen.Color, Color.DarkSalmon);
544
545                         try {
546                                 pen.Color = Color.DarkSalmon;
547                                 Fail ("P33#3: must throw ArgumentException");
548                         } catch (ArgumentException) {
549                                 Assert ("P33#3", true);
550                         }
551                 }
552
553                 [Test]
554                 public void TestDarkSeaGreen ()
555                 {
556                         Pen pen = Pens.DarkSeaGreen;
557                         AssertEquals ("P34#1", pen.PenType, PenType.SolidColor);
558                         AssertEquals ("P34#2", pen.Color, Color.DarkSeaGreen);
559
560                         try {
561                                 pen.Color = Color.DarkSeaGreen;
562                                 Fail ("P34#3: must throw ArgumentException");
563                         } catch (ArgumentException) {
564                                 Assert ("P34#3", true);
565                         }
566                 }
567
568                 [Test]
569                 public void TestDarkSlateBlue ()
570                 {
571                         Pen pen = Pens.DarkSlateBlue;
572                         AssertEquals ("P35#1", pen.PenType, PenType.SolidColor);
573                         AssertEquals ("P35#2", pen.Color, Color.DarkSlateBlue);
574
575                         try {
576                                 pen.Color = Color.DarkSlateBlue;
577                                 Fail ("P35#3: must throw ArgumentException");
578                         } catch (ArgumentException) {
579                                 Assert ("P35#3", true);
580                         }
581                 }
582
583                 [Test]
584                 public void TestDarkSlateGray ()
585                 {
586                         Pen pen = Pens.DarkSlateGray;
587                         AssertEquals ("P36#1", pen.PenType, PenType.SolidColor);
588                         AssertEquals ("P36#2", pen.Color, Color.DarkSlateGray);
589
590                         try {
591                                 pen.Color = Color.DarkSlateGray;
592                                 Fail ("P36#3: must throw ArgumentException");
593                         } catch (ArgumentException) {
594                                 Assert ("P36#3", true);
595                         }
596                 }
597
598                 [Test]
599                 public void TestDarkTurquoise ()
600                 {
601                         Pen pen = Pens.DarkTurquoise;
602                         AssertEquals ("P37#1", pen.PenType, PenType.SolidColor);
603                         AssertEquals ("P37#2", pen.Color, Color.DarkTurquoise);
604
605                         try {
606                                 pen.Color = Color.DarkTurquoise;
607                                 Fail ("P37#3: must throw ArgumentException");
608                         } catch (ArgumentException) {
609                                 Assert ("P37#3", true);
610                         }
611                 }
612
613                 [Test]
614                 public void TestDarkViolet ()
615                 {
616                         Pen pen = Pens.DarkViolet;
617                         AssertEquals ("P38#1", pen.PenType, PenType.SolidColor);
618                         AssertEquals ("P38#2", pen.Color, Color.DarkViolet);
619
620                         try {
621                                 pen.Color = Color.DarkViolet;
622                                 Fail ("P38#3: must throw ArgumentException");
623                         } catch (ArgumentException) {
624                                 Assert ("P38#3", true);
625                         }
626                 }
627
628                 [Test]
629                 public void TestDeepPink ()
630                 {
631                         Pen pen = Pens.DeepPink;
632                         AssertEquals ("P39#1", pen.PenType, PenType.SolidColor);
633                         AssertEquals ("P39#2", pen.Color, Color.DeepPink);
634
635                         try {
636                                 pen.Color = Color.DeepPink;
637                                 Fail ("P39#3: must throw ArgumentException");
638                         } catch (ArgumentException) {
639                                 Assert ("P39#3", true);
640                         }
641                 }
642
643                 [Test]
644                 public void TestDeepSkyBlue ()
645                 {
646                         Pen pen = Pens.DeepSkyBlue;
647                         AssertEquals ("P40#1", pen.PenType, PenType.SolidColor);
648                         AssertEquals ("P40#2", pen.Color, Color.DeepSkyBlue);
649
650                         try {
651                                 pen.Color = Color.DeepSkyBlue;
652                                 Fail ("P40#3: must throw ArgumentException");
653                         } catch (ArgumentException) {
654                                 Assert ("P40#3", true);
655                         }
656                 }
657
658                 [Test]
659                 public void TestDimGray ()
660                 {
661                         Pen pen = Pens.DimGray;
662                         AssertEquals ("P41#1", pen.PenType, PenType.SolidColor);
663                         AssertEquals ("P41#2", pen.Color, Color.DimGray);
664
665                         try {
666                                 pen.Color = Color.DimGray;
667                                 Fail ("P41#3: must throw ArgumentException");
668                         } catch (ArgumentException) {
669                                 Assert ("P41#3", true);
670                         }
671                 }
672
673                 [Test]
674                 public void TestDodgerBlue ()
675                 {
676                         Pen pen = Pens.DodgerBlue;
677                         AssertEquals ("P42#1", pen.PenType, PenType.SolidColor);
678                         AssertEquals ("P42#2", pen.Color, Color.DodgerBlue);
679
680                         try {
681                                 pen.Color = Color.DodgerBlue;
682                                 Fail ("P42#3: must throw ArgumentException");
683                         } catch (ArgumentException) {
684                                 Assert ("P42#3", true);
685                         }
686                 }
687
688                 [Test]
689                 public void TestFirebrick ()
690                 {
691                         Pen pen = Pens.Firebrick;
692                         AssertEquals ("P43#1", pen.PenType, PenType.SolidColor);
693                         AssertEquals ("P43#2", pen.Color, Color.Firebrick);
694
695                         try {
696                                 pen.Color = Color.Firebrick;
697                                 Fail ("P43#3: must throw ArgumentException");
698                         } catch (ArgumentException) {
699                                 Assert ("P43#3", true);
700                         }
701                 }
702
703                 [Test]
704                 public void TestFloralWhite ()
705                 {
706                         Pen pen = Pens.FloralWhite;
707                         AssertEquals ("P44#1", pen.PenType, PenType.SolidColor);
708                         AssertEquals ("P44#2", pen.Color, Color.FloralWhite);
709
710                         try {
711                                 pen.Color = Color.FloralWhite;
712                                 Fail ("P44#3: must throw ArgumentException");
713                         } catch (ArgumentException) {
714                                 Assert ("P44#3", true);
715                         }
716                 }
717
718                 [Test]
719                 public void TestForestGreen ()
720                 {
721                         Pen pen = Pens.ForestGreen;
722                         AssertEquals ("P45#1", pen.PenType, PenType.SolidColor);
723                         AssertEquals ("P45#2", pen.Color, Color.ForestGreen);
724
725                         try {
726                                 pen.Color = Color.ForestGreen;
727                                 Fail ("P45#3: must throw ArgumentException");
728                         } catch (ArgumentException) {
729                                 Assert ("P45#3", true);
730                         }
731                 }
732
733                 [Test]
734                 public void TestFuchsia ()
735                 {
736                         Pen pen = Pens.Fuchsia;
737                         AssertEquals ("P46#1", pen.PenType, PenType.SolidColor);
738                         AssertEquals ("P46#2", pen.Color, Color.Fuchsia);
739
740                         try {
741                                 pen.Color = Color.Fuchsia;
742                                 Fail ("P46#3: must throw ArgumentException");
743                         } catch (ArgumentException) {
744                                 Assert ("P46#3", true);
745                         }
746                 }
747
748                 [Test]
749                 public void TestGainsboro ()
750                 {
751                         Pen pen = Pens.Gainsboro;
752                         AssertEquals ("P47#1", pen.PenType, PenType.SolidColor);
753                         AssertEquals ("P47#2", pen.Color, Color.Gainsboro);
754
755                         try {
756                                 pen.Color = Color.Gainsboro;
757                                 Fail ("P47#3: must throw ArgumentException");
758                         } catch (ArgumentException) {
759                                 Assert ("P47#3", true);
760                         }
761                 }
762
763                 [Test]
764                 public void TestGhostWhite ()
765                 {
766                         Pen pen = Pens.GhostWhite;
767                         AssertEquals ("P48#1", pen.PenType, PenType.SolidColor);
768                         AssertEquals ("P48#2", pen.Color, Color.GhostWhite);
769
770                         try {
771                                 pen.Color = Color.GhostWhite;
772                                 Fail ("P48#3: must throw ArgumentException");
773                         } catch (ArgumentException) {
774                                 Assert ("P48#3", true);
775                         }
776                 }
777
778                 [Test]
779                 public void TestGold ()
780                 {
781                         Pen pen = Pens.Gold;
782                         AssertEquals ("P49#1", pen.PenType, PenType.SolidColor);
783                         AssertEquals ("P49#2", pen.Color, Color.Gold);
784
785                         try {
786                                 pen.Color = Color.Gold;
787                                 Fail ("P49#3: must throw ArgumentException");
788                         } catch (ArgumentException) {
789                                 Assert ("P49#3", true);
790                         }
791                 }
792
793                 [Test]
794                 public void TestGoldenrod ()
795                 {
796                         Pen pen = Pens.Goldenrod;
797                         AssertEquals ("P50#1", pen.PenType, PenType.SolidColor);
798                         AssertEquals ("P50#2", pen.Color, Color.Goldenrod);
799
800                         try {
801                                 pen.Color = Color.Goldenrod;
802                                 Fail ("P50#3: must throw ArgumentException");
803                         } catch (ArgumentException) {
804                                 Assert ("P50#3", true);
805                         }
806                 }
807
808                 [Test]
809                 public void TestGray ()
810                 {
811                         Pen pen = Pens.Gray;
812                         AssertEquals ("P51#1", pen.PenType, PenType.SolidColor);
813                         AssertEquals ("P51#2", pen.Color, Color.Gray);
814
815                         try {
816                                 pen.Color = Color.Gray;
817                                 Fail ("P51#3: must throw ArgumentException");
818                         } catch (ArgumentException) {
819                                 Assert ("P51#3", true);
820                         }
821                 }
822
823                 [Test]
824                 public void TestGreen ()
825                 {
826                         Pen pen = Pens.Green;
827                         AssertEquals ("P52#1", pen.PenType, PenType.SolidColor);
828                         AssertEquals ("P52#2", pen.Color, Color.Green);
829
830                         try {
831                                 pen.Color = Color.Green;
832                                 Fail ("P52#3: must throw ArgumentException");
833                         } catch (ArgumentException) {
834                                 Assert ("P52#3", true);
835                         }
836                 }
837
838                 [Test]
839                 public void TestGreenYellow ()
840                 {
841                         Pen pen = Pens.GreenYellow;
842                         AssertEquals ("P53#1", pen.PenType, PenType.SolidColor);
843                         AssertEquals ("P53#2", pen.Color, Color.GreenYellow);
844
845                         try {
846                                 pen.Color = Color.GreenYellow;
847                                 Fail ("P53#3: must throw ArgumentException");
848                         } catch (ArgumentException) {
849                                 Assert ("P53#3", true);
850                         }
851                 }
852
853                 [Test]
854                 public void TestHoneydew ()
855                 {
856                         Pen pen = Pens.Honeydew;
857                         AssertEquals ("P54#1", pen.PenType, PenType.SolidColor);
858                         AssertEquals ("P54#2", pen.Color, Color.Honeydew);
859
860                         try {
861                                 pen.Color = Color.Honeydew;
862                                 Fail ("P54#3: must throw ArgumentException");
863                         } catch (ArgumentException) {
864                                 Assert ("P54#3", true);
865                         }
866                 }
867
868                 [Test]
869                 public void TestHotPink ()
870                 {
871                         Pen pen = Pens.HotPink;
872                         AssertEquals ("P55#1", pen.PenType, PenType.SolidColor);
873                         AssertEquals ("P55#2", pen.Color, Color.HotPink);
874
875                         try {
876                                 pen.Color = Color.HotPink;
877                                 Fail ("P55#3: must throw ArgumentException");
878                         } catch (ArgumentException) {
879                                 Assert ("P55#3", true);
880                         }
881                 }
882
883                 [Test]
884                 public void TestIndianRed ()
885                 {
886                         Pen pen = Pens.IndianRed;
887                         AssertEquals ("P56#1", pen.PenType, PenType.SolidColor);
888                         AssertEquals ("P56#2", pen.Color, Color.IndianRed);
889
890                         try {
891                                 pen.Color = Color.IndianRed;
892                                 Fail ("P56#3: must throw ArgumentException");
893                         } catch (ArgumentException) {
894                                 Assert ("P56#3", true);
895                         }
896                 }
897
898                 [Test]
899                 public void TestIndigo ()
900                 {
901                         Pen pen = Pens.Indigo;
902                         AssertEquals ("P57#1", pen.PenType, PenType.SolidColor);
903                         AssertEquals ("P57#2", pen.Color, Color.Indigo);
904
905                         try {
906                                 pen.Color = Color.Indigo;
907                                 Fail ("P57#3: must throw ArgumentException");
908                         } catch (ArgumentException) {
909                                 Assert ("P57#3", true);
910                         }
911                 }
912
913                 [Test]
914                 public void TestIvory ()
915                 {
916                         Pen pen = Pens.Ivory;
917                         AssertEquals ("P58#1", pen.PenType, PenType.SolidColor);
918                         AssertEquals ("P58#2", pen.Color, Color.Ivory);
919
920                         try {
921                                 pen.Color = Color.Ivory;
922                                 Fail ("P58#3: must throw ArgumentException");
923                         } catch (ArgumentException) {
924                                 Assert ("P58#3", true);
925                         }
926                 }
927
928                 [Test]
929                 public void TestKhaki ()
930                 {
931                         Pen pen = Pens.Khaki;
932                         AssertEquals ("P59#1", pen.PenType, PenType.SolidColor);
933                         AssertEquals ("P59#2", pen.Color, Color.Khaki);
934
935                         try {
936                                 pen.Color = Color.Khaki;
937                                 Fail ("P59#3: must throw ArgumentException");
938                         } catch (ArgumentException) {
939                                 Assert ("P59#3", true);
940                         }
941                 }
942
943                 [Test]
944                 public void TestLavender ()
945                 {
946                         Pen pen = Pens.Lavender;
947                         AssertEquals ("P60#1", pen.PenType, PenType.SolidColor);
948                         AssertEquals ("P60#2", pen.Color, Color.Lavender);
949
950                         try {
951                                 pen.Color = Color.Lavender;
952                                 Fail ("P60#3: must throw ArgumentException");
953                         } catch (ArgumentException) {
954                                 Assert ("P60#3", true);
955                         }
956                 }
957
958                 [Test]
959                 public void TestLavenderBlush ()
960                 {
961                         Pen pen = Pens.LavenderBlush;
962                         AssertEquals ("P61#1", pen.PenType, PenType.SolidColor);
963                         AssertEquals ("P61#2", pen.Color, Color.LavenderBlush);
964
965                         try {
966                                 pen.Color = Color.LavenderBlush;
967                                 Fail ("P61#3: must throw ArgumentException");
968                         } catch (ArgumentException) {
969                                 Assert ("P61#3", true);
970                         }
971                 }
972
973                 [Test]
974                 public void TestLawnGreen ()
975                 {
976                         Pen pen = Pens.LawnGreen;
977                         AssertEquals ("P62#1", pen.PenType, PenType.SolidColor);
978                         AssertEquals ("P62#2", pen.Color, Color.LawnGreen);
979
980                         try {
981                                 pen.Color = Color.LawnGreen;
982                                 Fail ("P62#3: must throw ArgumentException");
983                         } catch (ArgumentException) {
984                                 Assert ("P62#3", true);
985                         }
986                 }
987
988                 [Test]
989                 public void TestLemonChiffon ()
990                 {
991                         Pen pen = Pens.LemonChiffon;
992                         AssertEquals ("P63#1", pen.PenType, PenType.SolidColor);
993                         AssertEquals ("P63#2", pen.Color, Color.LemonChiffon);
994
995                         try {
996                                 pen.Color = Color.LemonChiffon;
997                                 Fail ("P63#3: must throw ArgumentException");
998                         } catch (ArgumentException) {
999                                 Assert ("P63#3", true);
1000                         }
1001                 }
1002
1003                 [Test]
1004                 public void TestLightBlue ()
1005                 {
1006                         Pen pen = Pens.LightBlue;
1007                         AssertEquals ("P64#1", pen.PenType, PenType.SolidColor);
1008                         AssertEquals ("P64#2", pen.Color, Color.LightBlue);
1009
1010                         try {
1011                                 pen.Color = Color.LightBlue;
1012                                 Fail ("P64#3: must throw ArgumentException");
1013                         } catch (ArgumentException) {
1014                                 Assert ("P64#3", true);
1015                         }
1016                 }
1017
1018                 [Test]
1019                 public void TestLightCoral ()
1020                 {
1021                         Pen pen = Pens.LightCoral;
1022                         AssertEquals ("P65#1", pen.PenType, PenType.SolidColor);
1023                         AssertEquals ("P65#2", pen.Color, Color.LightCoral);
1024
1025                         try {
1026                                 pen.Color = Color.LightCoral;
1027                                 Fail ("P65#3: must throw ArgumentException");
1028                         } catch (ArgumentException) {
1029                                 Assert ("P65#3", true);
1030                         }
1031                 }
1032
1033                 [Test]
1034                 public void TestLightCyan ()
1035                 {
1036                         Pen pen = Pens.LightCyan;
1037                         AssertEquals ("P66#1", pen.PenType, PenType.SolidColor);
1038                         AssertEquals ("P66#2", pen.Color, Color.LightCyan);
1039
1040                         try {
1041                                 pen.Color = Color.LightCyan;
1042                                 Fail ("P66#3: must throw ArgumentException");
1043                         } catch (ArgumentException) {
1044                                 Assert ("P66#3", true);
1045                         }
1046                 }
1047
1048                 [Test]
1049                 public void TestLightGoldenrodYellow ()
1050                 {
1051                         Pen pen = Pens.LightGoldenrodYellow;
1052                         AssertEquals ("P67#1", pen.PenType, PenType.SolidColor);
1053                         AssertEquals ("P67#2", pen.Color, Color.LightGoldenrodYellow);
1054
1055                         try {
1056                                 pen.Color = Color.LightGoldenrodYellow;
1057                                 Fail ("P67#3: must throw ArgumentException");
1058                         } catch (ArgumentException) {
1059                                 Assert ("P67#3", true);
1060                         }
1061                 }
1062
1063                 [Test]
1064                 public void TestLightGray ()
1065                 {
1066                         Pen pen = Pens.LightGray;
1067                         AssertEquals ("P68#1", pen.PenType, PenType.SolidColor);
1068                         AssertEquals ("P68#2", pen.Color, Color.LightGray);
1069
1070                         try {
1071                                 pen.Color = Color.LightGray;
1072                                 Fail ("P68#3: must throw ArgumentException");
1073                         } catch (ArgumentException) {
1074                                 Assert ("P68#3", true);
1075                         }
1076                 }
1077
1078                 [Test]
1079                 public void TestLightGreen ()
1080                 {
1081                         Pen pen = Pens.LightGreen;
1082                         AssertEquals ("P69#1", pen.PenType, PenType.SolidColor);
1083                         AssertEquals ("P69#2", pen.Color, Color.LightGreen);
1084
1085                         try {
1086                                 pen.Color = Color.LightGreen;
1087                                 Fail ("P69#3: must throw ArgumentException");
1088                         } catch (ArgumentException) {
1089                                 Assert ("P69#3", true);
1090                         }
1091                 }
1092
1093                 [Test]
1094                 public void TestLightPink ()
1095                 {
1096                         Pen pen = Pens.LightPink;
1097                         AssertEquals ("P70#1", pen.PenType, PenType.SolidColor);
1098                         AssertEquals ("P70#2", pen.Color, Color.LightPink);
1099
1100                         try {
1101                                 pen.Color = Color.LightPink;
1102                                 Fail ("P70#3: must throw ArgumentException");
1103                         } catch (ArgumentException) {
1104                                 Assert ("P70#3", true);
1105                         }
1106                 }
1107
1108                 [Test]
1109                 public void TestLightSalmon ()
1110                 {
1111                         Pen pen = Pens.LightSalmon;
1112                         AssertEquals ("P71#1", pen.PenType, PenType.SolidColor);
1113                         AssertEquals ("P71#2", pen.Color, Color.LightSalmon);
1114
1115                         try {
1116                                 pen.Color = Color.LightSalmon;
1117                                 Fail ("P71#3: must throw ArgumentException");
1118                         } catch (ArgumentException) {
1119                                 Assert ("P71#3", true);
1120                         }
1121                 }
1122
1123                 [Test]
1124                 public void TestLightSeaGreen ()
1125                 {
1126                         Pen pen = Pens.LightSeaGreen;
1127                         AssertEquals ("P72#1", pen.PenType, PenType.SolidColor);
1128                         AssertEquals ("P72#2", pen.Color, Color.LightSeaGreen);
1129
1130                         try {
1131                                 pen.Color = Color.LightSeaGreen;
1132                                 Fail ("P72#3: must throw ArgumentException");
1133                         } catch (ArgumentException) {
1134                                 Assert ("P72#3", true);
1135                         }
1136                 }
1137
1138                 [Test]
1139                 public void TestLightSkyBlue ()
1140                 {
1141                         Pen pen = Pens.LightSkyBlue;
1142                         AssertEquals ("P73#1", pen.PenType, PenType.SolidColor);
1143                         AssertEquals ("P73#2", pen.Color, Color.LightSkyBlue);
1144
1145                         try {
1146                                 pen.Color = Color.LightSkyBlue;
1147                                 Fail ("P73#3: must throw ArgumentException");
1148                         } catch (ArgumentException) {
1149                                 Assert ("P73#3", true);
1150                         }
1151                 }
1152
1153                 [Test]
1154                 public void TestLightSlateGray ()
1155                 {
1156                         Pen pen = Pens.LightSlateGray;
1157                         AssertEquals ("P74#1", pen.PenType, PenType.SolidColor);
1158                         AssertEquals ("P74#2", pen.Color, Color.LightSlateGray);
1159
1160                         try {
1161                                 pen.Color = Color.LightSlateGray;
1162                                 Fail ("P74#3: must throw ArgumentException");
1163                         } catch (ArgumentException) {
1164                                 Assert ("P74#3", true);
1165                         }
1166                 }
1167
1168                 [Test]
1169                 public void TestLightSteelBlue ()
1170                 {
1171                         Pen pen = Pens.LightSteelBlue;
1172                         AssertEquals ("P75#1", pen.PenType, PenType.SolidColor);
1173                         AssertEquals ("P75#2", pen.Color, Color.LightSteelBlue);
1174
1175                         try {
1176                                 pen.Color = Color.LightSteelBlue;
1177                                 Fail ("P75#3: must throw ArgumentException");
1178                         } catch (ArgumentException) {
1179                                 Assert ("P75#3", true);
1180                         }
1181                 }
1182
1183                 [Test]
1184                 public void TestLightYellow ()
1185                 {
1186                         Pen pen = Pens.LightYellow;
1187                         AssertEquals ("P76#1", pen.PenType, PenType.SolidColor);
1188                         AssertEquals ("P76#2", pen.Color, Color.LightYellow);
1189
1190                         try {
1191                                 pen.Color = Color.LightYellow;
1192                                 Fail ("P76#3: must throw ArgumentException");
1193                         } catch (ArgumentException) {
1194                                 Assert ("P76#3", true);
1195                         }
1196                 }
1197
1198                 [Test]
1199                 public void TestLime ()
1200                 {
1201                         Pen pen = Pens.Lime;
1202                         AssertEquals ("P77#1", pen.PenType, PenType.SolidColor);
1203                         AssertEquals ("P77#2", pen.Color, Color.Lime);
1204
1205                         try {
1206                                 pen.Color = Color.Lime;
1207                                 Fail ("P77#3: must throw ArgumentException");
1208                         } catch (ArgumentException) {
1209                                 Assert ("P77#3", true);
1210                         }
1211                 }
1212
1213                 [Test]
1214                 public void TestLimeGreen ()
1215                 {
1216                         Pen pen = Pens.LimeGreen;
1217                         AssertEquals ("P78#1", pen.PenType, PenType.SolidColor);
1218                         AssertEquals ("P78#2", pen.Color, Color.LimeGreen);
1219
1220                         try {
1221                                 pen.Color = Color.LimeGreen;
1222                                 Fail ("P78#3: must throw ArgumentException");
1223                         } catch (ArgumentException) {
1224                                 Assert ("P78#3", true);
1225                         }
1226                 }
1227
1228                 [Test]
1229                 public void TestLinen ()
1230                 {
1231                         Pen pen = Pens.Linen;
1232                         AssertEquals ("P79#1", pen.PenType, PenType.SolidColor);
1233                         AssertEquals ("P79#2", pen.Color, Color.Linen);
1234
1235                         try {
1236                                 pen.Color = Color.Linen;
1237                                 Fail ("P79#3: must throw ArgumentException");
1238                         } catch (ArgumentException) {
1239                                 Assert ("P79#3", true);
1240                         }
1241                 }
1242
1243                 [Test]
1244                 public void TestMagenta ()
1245                 {
1246                         Pen pen = Pens.Magenta;
1247                         AssertEquals ("P80#1", pen.PenType, PenType.SolidColor);
1248                         AssertEquals ("P80#2", pen.Color, Color.Magenta);
1249
1250                         try {
1251                                 pen.Color = Color.Magenta;
1252                                 Fail ("P80#3: must throw ArgumentException");
1253                         } catch (ArgumentException) {
1254                                 Assert ("P80#3", true);
1255                         }
1256                 }
1257
1258                 [Test]
1259                 public void TestMaroon ()
1260                 {
1261                         Pen pen = Pens.Maroon;
1262                         AssertEquals ("P81#1", pen.PenType, PenType.SolidColor);
1263                         AssertEquals ("P81#2", pen.Color, Color.Maroon);
1264
1265                         try {
1266                                 pen.Color = Color.Maroon;
1267                                 Fail ("P81#3: must throw ArgumentException");
1268                         } catch (ArgumentException) {
1269                                 Assert ("P81#3", true);
1270                         }
1271                 }
1272
1273                 [Test]
1274                 public void TestMediumAquamarine ()
1275                 {
1276                         Pen pen = Pens.MediumAquamarine;
1277                         AssertEquals ("P82#1", pen.PenType, PenType.SolidColor);
1278                         AssertEquals ("P82#2", pen.Color, Color.MediumAquamarine);
1279
1280                         try {
1281                                 pen.Color = Color.MediumAquamarine;
1282                                 Fail ("P82#3: must throw ArgumentException");
1283                         } catch (ArgumentException) {
1284                                 Assert ("P82#3", true);
1285                         }
1286                 }
1287
1288                 [Test]
1289                 public void TestMediumBlue ()
1290                 {
1291                         Pen pen = Pens.MediumBlue;
1292                         AssertEquals ("P83#1", pen.PenType, PenType.SolidColor);
1293                         AssertEquals ("P83#2", pen.Color, Color.MediumBlue);
1294
1295                         try {
1296                                 pen.Color = Color.MediumBlue;
1297                                 Fail ("P83#3: must throw ArgumentException");
1298                         } catch (ArgumentException) {
1299                                 Assert ("P83#3", true);
1300                         }
1301                 }
1302
1303                 [Test]
1304                 public void TestMediumOrchid ()
1305                 {
1306                         Pen pen = Pens.MediumOrchid;
1307                         AssertEquals ("P84#1", pen.PenType, PenType.SolidColor);
1308                         AssertEquals ("P84#2", pen.Color, Color.MediumOrchid);
1309
1310                         try {
1311                                 pen.Color = Color.MediumOrchid;
1312                                 Fail ("P84#3: must throw ArgumentException");
1313                         } catch (ArgumentException) {
1314                                 Assert ("P84#3", true);
1315                         }
1316                 }
1317
1318                 [Test]
1319                 public void TestMediumPurple ()
1320                 {
1321                         Pen pen = Pens.MediumPurple;
1322                         AssertEquals ("P85#1", pen.PenType, PenType.SolidColor);
1323                         AssertEquals ("P85#2", pen.Color, Color.MediumPurple);
1324
1325                         try {
1326                                 pen.Color = Color.MediumPurple;
1327                                 Fail ("P85#3: must throw ArgumentException");
1328                         } catch (ArgumentException) {
1329                                 Assert ("P85#3", true);
1330                         }
1331                 }
1332
1333                 [Test]
1334                 public void TestMediumSeaGreen ()
1335                 {
1336                         Pen pen = Pens.MediumSeaGreen;
1337                         AssertEquals ("P86#1", pen.PenType, PenType.SolidColor);
1338                         AssertEquals ("P86#2", pen.Color, Color.MediumSeaGreen);
1339
1340                         try {
1341                                 pen.Color = Color.MediumSeaGreen;
1342                                 Fail ("P86#3: must throw ArgumentException");
1343                         } catch (ArgumentException) {
1344                                 Assert ("P86#3", true);
1345                         }
1346                 }
1347
1348                 [Test]
1349                 public void TestMediumSlateBlue ()
1350                 {
1351                         Pen pen = Pens.MediumSlateBlue;
1352                         AssertEquals ("P87#1", pen.PenType, PenType.SolidColor);
1353                         AssertEquals ("P87#2", pen.Color, Color.MediumSlateBlue);
1354
1355                         try {
1356                                 pen.Color = Color.MediumSlateBlue;
1357                                 Fail ("P87#3: must throw ArgumentException");
1358                         } catch (ArgumentException) {
1359                                 Assert ("P87#3", true);
1360                         }
1361                 }
1362
1363                 [Test]
1364                 public void TestMediumSpringGreen ()
1365                 {
1366                         Pen pen = Pens.MediumSpringGreen;
1367                         AssertEquals ("P88#1", pen.PenType, PenType.SolidColor);
1368                         AssertEquals ("P88#2", pen.Color, Color.MediumSpringGreen);
1369
1370                         try {
1371                                 pen.Color = Color.MediumSpringGreen;
1372                                 Fail ("P88#3: must throw ArgumentException");
1373                         } catch (ArgumentException) {
1374                                 Assert ("P88#3", true);
1375                         }
1376                 }
1377
1378                 [Test]
1379                 public void TestMediumTurquoise ()
1380                 {
1381                         Pen pen = Pens.MediumTurquoise;
1382                         AssertEquals ("P89#1", pen.PenType, PenType.SolidColor);
1383                         AssertEquals ("P89#2", pen.Color, Color.MediumTurquoise);
1384
1385                         try {
1386                                 pen.Color = Color.MediumTurquoise;
1387                                 Fail ("P89#3: must throw ArgumentException");
1388                         } catch (ArgumentException) {
1389                                 Assert ("P89#3", true);
1390                         }
1391                 }
1392
1393                 [Test]
1394                 public void TestMediumVioletRed ()
1395                 {
1396                         Pen pen = Pens.MediumVioletRed;
1397                         AssertEquals ("P90#1", pen.PenType, PenType.SolidColor);
1398                         AssertEquals ("P90#2", pen.Color, Color.MediumVioletRed);
1399
1400                         try {
1401                                 pen.Color = Color.MediumVioletRed;
1402                                 Fail ("P90#3: must throw ArgumentException");
1403                         } catch (ArgumentException) {
1404                                 Assert ("P90#3", true);
1405                         }
1406                 }
1407
1408                 [Test]
1409                 public void TestMidnightBlue ()
1410                 {
1411                         Pen pen = Pens.MidnightBlue;
1412                         AssertEquals ("P91#1", pen.PenType, PenType.SolidColor);
1413                         AssertEquals ("P91#2", pen.Color, Color.MidnightBlue);
1414
1415                         try {
1416                                 pen.Color = Color.MidnightBlue;
1417                                 Fail ("P91#3: must throw ArgumentException");
1418                         } catch (ArgumentException) {
1419                                 Assert ("P91#3", true);
1420                         }
1421                 }
1422
1423                 [Test]
1424                 public void TestMintCream ()
1425                 {
1426                         Pen pen = Pens.MintCream;
1427                         AssertEquals ("P92#1", pen.PenType, PenType.SolidColor);
1428                         AssertEquals ("P92#2", pen.Color, Color.MintCream);
1429
1430                         try {
1431                                 pen.Color = Color.MintCream;
1432                                 Fail ("P92#3: must throw ArgumentException");
1433                         } catch (ArgumentException) {
1434                                 Assert ("P92#3", true);
1435                         }
1436                 }
1437
1438                 [Test]
1439                 public void TestMistyRose ()
1440                 {
1441                         Pen pen = Pens.MistyRose;
1442                         AssertEquals ("P93#1", pen.PenType, PenType.SolidColor);
1443                         AssertEquals ("P93#2", pen.Color, Color.MistyRose);
1444
1445                         try {
1446                                 pen.Color = Color.MistyRose;
1447                                 Fail ("P93#3: must throw ArgumentException");
1448                         } catch (ArgumentException) {
1449                                 Assert ("P93#3", true);
1450                         }
1451                 }
1452
1453                 [Test]
1454                 public void TestMoccasin ()
1455                 {
1456                         Pen pen = Pens.Moccasin;
1457                         AssertEquals ("P94#1", pen.PenType, PenType.SolidColor);
1458                         AssertEquals ("P94#2", pen.Color, Color.Moccasin);
1459
1460                         try {
1461                                 pen.Color = Color.Moccasin;
1462                                 Fail ("P94#3: must throw ArgumentException");
1463                         } catch (ArgumentException) {
1464                                 Assert ("P94#3", true);
1465                         }
1466                 }
1467
1468                 [Test]
1469                 public void TestNavajoWhite ()
1470                 {
1471                         Pen pen = Pens.NavajoWhite;
1472                         AssertEquals ("P95#1", pen.PenType, PenType.SolidColor);
1473                         AssertEquals ("P95#2", pen.Color, Color.NavajoWhite);
1474
1475                         try {
1476                                 pen.Color = Color.NavajoWhite;
1477                                 Fail ("P95#3: must throw ArgumentException");
1478                         } catch (ArgumentException) {
1479                                 Assert ("P95#3", true);
1480                         }
1481                 }
1482
1483                 [Test]
1484                 public void TestNavy ()
1485                 {
1486                         Pen pen = Pens.Navy;
1487                         AssertEquals ("P96#1", pen.PenType, PenType.SolidColor);
1488                         AssertEquals ("P96#2", pen.Color, Color.Navy);
1489
1490                         try {
1491                                 pen.Color = Color.Navy;
1492                                 Fail ("P96#3: must throw ArgumentException");
1493                         } catch (ArgumentException) {
1494                                 Assert ("P96#3", true);
1495                         }
1496                 }
1497
1498                 [Test]
1499                 public void TestOldLace ()
1500                 {
1501                         Pen pen = Pens.OldLace;
1502                         AssertEquals ("P97#1", pen.PenType, PenType.SolidColor);
1503                         AssertEquals ("P97#2", pen.Color, Color.OldLace);
1504
1505                         try {
1506                                 pen.Color = Color.OldLace;
1507                                 Fail ("P97#3: must throw ArgumentException");
1508                         } catch (ArgumentException) {
1509                                 Assert ("P97#3", true);
1510                         }
1511                 }
1512
1513                 [Test]
1514                 public void TestOlive ()
1515                 {
1516                         Pen pen = Pens.Olive;
1517                         AssertEquals ("P98#1", pen.PenType, PenType.SolidColor);
1518                         AssertEquals ("P98#2", pen.Color, Color.Olive);
1519
1520                         try {
1521                                 pen.Color = Color.Olive;
1522                                 Fail ("P98#3: must throw ArgumentException");
1523                         } catch (ArgumentException) {
1524                                 Assert ("P98#3", true);
1525                         }
1526                 }
1527
1528                 [Test]
1529                 public void TestOliveDrab ()
1530                 {
1531                         Pen pen = Pens.OliveDrab;
1532                         AssertEquals ("P99#1", pen.PenType, PenType.SolidColor);
1533                         AssertEquals ("P99#2", pen.Color, Color.OliveDrab);
1534
1535                         try {
1536                                 pen.Color = Color.OliveDrab;
1537                                 Fail ("P99#3: must throw ArgumentException");
1538                         } catch (ArgumentException) {
1539                                 Assert ("P99#3", true);
1540                         }
1541                 }
1542
1543                 [Test]
1544                 public void TestOrange ()
1545                 {
1546                         Pen pen = Pens.Orange;
1547                         AssertEquals ("P100#1", pen.PenType, PenType.SolidColor);
1548                         AssertEquals ("P100#2", pen.Color, Color.Orange);
1549
1550                         try {
1551                                 pen.Color = Color.Orange;
1552                                 Fail ("P100#3: must throw ArgumentException");
1553                         } catch (ArgumentException) {
1554                                 Assert ("P100#3", true);
1555                         }
1556                 }
1557
1558                 [Test]
1559                 public void TestOrangeRed ()
1560                 {
1561                         Pen pen = Pens.OrangeRed;
1562                         AssertEquals ("P101#1", pen.PenType, PenType.SolidColor);
1563                         AssertEquals ("P101#2", pen.Color, Color.OrangeRed);
1564
1565                         try {
1566                                 pen.Color = Color.OrangeRed;
1567                                 Fail ("P101#3: must throw ArgumentException");
1568                         } catch (ArgumentException) {
1569                                 Assert ("P101#3", true);
1570                         }
1571                 }
1572
1573                 [Test]
1574                 public void TestOrchid ()
1575                 {
1576                         Pen pen = Pens.Orchid;
1577                         AssertEquals ("P102#1", pen.PenType, PenType.SolidColor);
1578                         AssertEquals ("P102#2", pen.Color, Color.Orchid);
1579
1580                         try {
1581                                 pen.Color = Color.Orchid;
1582                                 Fail ("P102#3: must throw ArgumentException");
1583                         } catch (ArgumentException) {
1584                                 Assert ("P102#3", true);
1585                         }
1586                 }
1587
1588                 [Test]
1589                 public void TestPaleGoldenrod ()
1590                 {
1591                         Pen pen = Pens.PaleGoldenrod;
1592                         AssertEquals ("P103#1", pen.PenType, PenType.SolidColor);
1593                         AssertEquals ("P103#2", pen.Color, Color.PaleGoldenrod);
1594
1595                         try {
1596                                 pen.Color = Color.PaleGoldenrod;
1597                                 Fail ("P103#3: must throw ArgumentException");
1598                         } catch (ArgumentException) {
1599                                 Assert ("P103#3", true);
1600                         }
1601                 }
1602
1603                 [Test]
1604                 public void TestPaleGreen ()
1605                 {
1606                         Pen pen = Pens.PaleGreen;
1607                         AssertEquals ("P104#1", pen.PenType, PenType.SolidColor);
1608                         AssertEquals ("P104#2", pen.Color, Color.PaleGreen);
1609
1610                         try {
1611                                 pen.Color = Color.PaleGreen;
1612                                 Fail ("P104#3: must throw ArgumentException");
1613                         } catch (ArgumentException) {
1614                                 Assert ("P104#3", true);
1615                         }
1616                 }
1617
1618                 [Test]
1619                 public void TestPaleTurquoise ()
1620                 {
1621                         Pen pen = Pens.PaleTurquoise;
1622                         AssertEquals ("P105#1", pen.PenType, PenType.SolidColor);
1623                         AssertEquals ("P105#2", pen.Color, Color.PaleTurquoise);
1624
1625                         try {
1626                                 pen.Color = Color.PaleTurquoise;
1627                                 Fail ("P105#3: must throw ArgumentException");
1628                         } catch (ArgumentException) {
1629                                 Assert ("P105#3", true);
1630                         }
1631                 }
1632
1633                 [Test]
1634                 public void TestPaleVioletRed ()
1635                 {
1636                         Pen pen = Pens.PaleVioletRed;
1637                         AssertEquals ("P106#1", pen.PenType, PenType.SolidColor);
1638                         AssertEquals ("P106#2", pen.Color, Color.PaleVioletRed);
1639
1640                         try {
1641                                 pen.Color = Color.PaleVioletRed;
1642                                 Fail ("P106#3: must throw ArgumentException");
1643                         } catch (ArgumentException) {
1644                                 Assert ("P106#3", true);
1645                         }
1646                 }
1647
1648                 [Test]
1649                 public void TestPapayaWhip ()
1650                 {
1651                         Pen pen = Pens.PapayaWhip;
1652                         AssertEquals ("P107#1", pen.PenType, PenType.SolidColor);
1653                         AssertEquals ("P107#2", pen.Color, Color.PapayaWhip);
1654
1655                         try {
1656                                 pen.Color = Color.PapayaWhip;
1657                                 Fail ("P107#3: must throw ArgumentException");
1658                         } catch (ArgumentException) {
1659                                 Assert ("P107#3", true);
1660                         }
1661                 }
1662
1663                 [Test]
1664                 public void TestPeachPuff ()
1665                 {
1666                         Pen pen = Pens.PeachPuff;
1667                         AssertEquals ("P108#1", pen.PenType, PenType.SolidColor);
1668                         AssertEquals ("P108#2", pen.Color, Color.PeachPuff);
1669
1670                         try {
1671                                 pen.Color = Color.PeachPuff;
1672                                 Fail ("P108#3: must throw ArgumentException");
1673                         } catch (ArgumentException) {
1674                                 Assert ("P108#3", true);
1675                         }
1676                 }
1677
1678                 [Test]
1679                 public void TestPeru ()
1680                 {
1681                         Pen pen = Pens.Peru;
1682                         AssertEquals ("P109#1", pen.PenType, PenType.SolidColor);
1683                         AssertEquals ("P109#2", pen.Color, Color.Peru);
1684
1685                         try {
1686                                 pen.Color = Color.Peru;
1687                                 Fail ("P109#3: must throw ArgumentException");
1688                         } catch (ArgumentException) {
1689                                 Assert ("P109#3", true);
1690                         }
1691                 }
1692
1693                 [Test]
1694                 public void TestPink ()
1695                 {
1696                         Pen pen = Pens.Pink;
1697                         AssertEquals ("P110#1", pen.PenType, PenType.SolidColor);
1698                         AssertEquals ("P110#2", pen.Color, Color.Pink);
1699
1700                         try {
1701                                 pen.Color = Color.Pink;
1702                                 Fail ("P110#3: must throw ArgumentException");
1703                         } catch (ArgumentException) {
1704                                 Assert ("P110#3", true);
1705                         }
1706                 }
1707
1708                 [Test]
1709                 public void TestPlum ()
1710                 {
1711                         Pen pen = Pens.Plum;
1712                         AssertEquals ("P111#1", pen.PenType, PenType.SolidColor);
1713                         AssertEquals ("P111#2", pen.Color, Color.Plum);
1714
1715                         try {
1716                                 pen.Color = Color.Plum;
1717                                 Fail ("P111#3: must throw ArgumentException");
1718                         } catch (ArgumentException) {
1719                                 Assert ("P111#3", true);
1720                         }
1721                 }
1722
1723                 [Test]
1724                 public void TestPowderBlue ()
1725                 {
1726                         Pen pen = Pens.PowderBlue;
1727                         AssertEquals ("P112#1", pen.PenType, PenType.SolidColor);
1728                         AssertEquals ("P112#2", pen.Color, Color.PowderBlue);
1729
1730                         try {
1731                                 pen.Color = Color.PowderBlue;
1732                                 Fail ("P112#3: must throw ArgumentException");
1733                         } catch (ArgumentException) {
1734                                 Assert ("P112#3", true);
1735                         }
1736                 }
1737
1738                 [Test]
1739                 public void TestPurple ()
1740                 {
1741                         Pen pen = Pens.Purple;
1742                         AssertEquals ("P113#1", pen.PenType, PenType.SolidColor);
1743                         AssertEquals ("P113#2", pen.Color, Color.Purple);
1744
1745                         try {
1746                                 pen.Color = Color.Purple;
1747                                 Fail ("P113#3: must throw ArgumentException");
1748                         } catch (ArgumentException) {
1749                                 Assert ("P113#3", true);
1750                         }
1751                 }
1752
1753                 [Test]
1754                 public void TestRed ()
1755                 {
1756                         Pen pen = Pens.Red;
1757                         AssertEquals ("P114#1", pen.PenType, PenType.SolidColor);
1758                         AssertEquals ("P114#2", pen.Color, Color.Red);
1759
1760                         try {
1761                                 pen.Color = Color.Red;
1762                                 Fail ("P114#3: must throw ArgumentException");
1763                         } catch (ArgumentException) {
1764                                 Assert ("P114#3", true);
1765                         }
1766                 }
1767
1768                 [Test]
1769                 public void TestRosyBrown ()
1770                 {
1771                         Pen pen = Pens.RosyBrown;
1772                         AssertEquals ("P115#1", pen.PenType, PenType.SolidColor);
1773                         AssertEquals ("P115#2", pen.Color, Color.RosyBrown);
1774
1775                         try {
1776                                 pen.Color = Color.RosyBrown;
1777                                 Fail ("P115#3: must throw ArgumentException");
1778                         } catch (ArgumentException) {
1779                                 Assert ("P115#3", true);
1780                         }
1781                 }
1782
1783                 [Test]
1784                 public void TestRoyalBlue ()
1785                 {
1786                         Pen pen = Pens.RoyalBlue;
1787                         AssertEquals ("P116#1", pen.PenType, PenType.SolidColor);
1788                         AssertEquals ("P116#2", pen.Color, Color.RoyalBlue);
1789
1790                         try {
1791                                 pen.Color = Color.RoyalBlue;
1792                                 Fail ("P116#3: must throw ArgumentException");
1793                         } catch (ArgumentException) {
1794                                 Assert ("P116#3", true);
1795                         }
1796                 }
1797
1798                 [Test]
1799                 public void TestSaddleBrown ()
1800                 {
1801                         Pen pen = Pens.SaddleBrown;
1802                         AssertEquals ("P117#1", pen.PenType, PenType.SolidColor);
1803                         AssertEquals ("P117#2", pen.Color, Color.SaddleBrown);
1804
1805                         try {
1806                                 pen.Color = Color.SaddleBrown;
1807                                 Fail ("P117#3: must throw ArgumentException");
1808                         } catch (ArgumentException) {
1809                                 Assert ("P117#3", true);
1810                         }
1811                 }
1812
1813                 [Test]
1814                 public void TestSalmon ()
1815                 {
1816                         Pen pen = Pens.Salmon;
1817                         AssertEquals ("P118#1", pen.PenType, PenType.SolidColor);
1818                         AssertEquals ("P118#2", pen.Color, Color.Salmon);
1819
1820                         try {
1821                                 pen.Color = Color.Salmon;
1822                                 Fail ("P118#3: must throw ArgumentException");
1823                         } catch (ArgumentException) {
1824                                 Assert ("P118#3", true);
1825                         }
1826                 }
1827
1828                 [Test]
1829                 public void TestSandyBrown ()
1830                 {
1831                         Pen pen = Pens.SandyBrown;
1832                         AssertEquals ("P119#1", pen.PenType, PenType.SolidColor);
1833                         AssertEquals ("P119#2", pen.Color, Color.SandyBrown);
1834
1835                         try {
1836                                 pen.Color = Color.SandyBrown;
1837                                 Fail ("P119#3: must throw ArgumentException");
1838                         } catch (ArgumentException) {
1839                                 Assert ("P119#3", true);
1840                         }
1841                 }
1842
1843                 [Test]
1844                 public void TestSeaGreen ()
1845                 {
1846                         Pen pen = Pens.SeaGreen;
1847                         AssertEquals ("P120#1", pen.PenType, PenType.SolidColor);
1848                         AssertEquals ("P120#2", pen.Color, Color.SeaGreen);
1849
1850                         try {
1851                                 pen.Color = Color.SeaGreen;
1852                                 Fail ("P120#3: must throw ArgumentException");
1853                         } catch (ArgumentException) {
1854                                 Assert ("P120#3", true);
1855                         }
1856                 }
1857
1858                 [Test]
1859                 public void TestSeaShell ()
1860                 {
1861                         Pen pen = Pens.SeaShell;
1862                         AssertEquals ("P121#1", pen.PenType, PenType.SolidColor);
1863                         AssertEquals ("P121#2", pen.Color, Color.SeaShell);
1864
1865                         try {
1866                                 pen.Color = Color.SeaShell;
1867                                 Fail ("P121#3: must throw ArgumentException");
1868                         } catch (ArgumentException) {
1869                                 Assert ("P121#3", true);
1870                         }
1871                 }
1872
1873                 [Test]
1874                 public void TestSienna ()
1875                 {
1876                         Pen pen = Pens.Sienna;
1877                         AssertEquals ("P122#1", pen.PenType, PenType.SolidColor);
1878                         AssertEquals ("P122#2", pen.Color, Color.Sienna);
1879
1880                         try {
1881                                 pen.Color = Color.Sienna;
1882                                 Fail ("P122#3: must throw ArgumentException");
1883                         } catch (ArgumentException) {
1884                                 Assert ("P122#3", true);
1885                         }
1886                 }
1887
1888                 [Test]
1889                 public void TestSilver ()
1890                 {
1891                         Pen pen = Pens.Silver;
1892                         AssertEquals ("P123#1", pen.PenType, PenType.SolidColor);
1893                         AssertEquals ("P123#2", pen.Color, Color.Silver);
1894
1895                         try {
1896                                 pen.Color = Color.Silver;
1897                                 Fail ("P123#3: must throw ArgumentException");
1898                         } catch (ArgumentException) {
1899                                 Assert ("P123#3", true);
1900                         }
1901                 }
1902
1903                 [Test]
1904                 public void TestSkyBlue ()
1905                 {
1906                         Pen pen = Pens.SkyBlue;
1907                         AssertEquals ("P124#1", pen.PenType, PenType.SolidColor);
1908                         AssertEquals ("P124#2", pen.Color, Color.SkyBlue);
1909
1910                         try {
1911                                 pen.Color = Color.SkyBlue;
1912                                 Fail ("P124#3: must throw ArgumentException");
1913                         } catch (ArgumentException) {
1914                                 Assert ("P124#3", true);
1915                         }
1916                 }
1917
1918                 [Test]
1919                 public void TestSlateBlue ()
1920                 {
1921                         Pen pen = Pens.SlateBlue;
1922                         AssertEquals ("P125#1", pen.PenType, PenType.SolidColor);
1923                         AssertEquals ("P125#2", pen.Color, Color.SlateBlue);
1924
1925                         try {
1926                                 pen.Color = Color.SlateBlue;
1927                                 Fail ("P125#3: must throw ArgumentException");
1928                         } catch (ArgumentException) {
1929                                 Assert ("P125#3", true);
1930                         }
1931                 }
1932
1933                 [Test]
1934                 public void TestSlateGray ()
1935                 {
1936                         Pen pen = Pens.SlateGray;
1937                         AssertEquals ("P126#1", pen.PenType, PenType.SolidColor);
1938                         AssertEquals ("P126#2", pen.Color, Color.SlateGray);
1939
1940                         try {
1941                                 pen.Color = Color.SlateGray;
1942                                 Fail ("P126#3: must throw ArgumentException");
1943                         } catch (ArgumentException) {
1944                                 Assert ("P126#3", true);
1945                         }
1946                 }
1947
1948                 [Test]
1949                 public void TestSnow ()
1950                 {
1951                         Pen pen = Pens.Snow;
1952                         AssertEquals ("P127#1", pen.PenType, PenType.SolidColor);
1953                         AssertEquals ("P127#2", pen.Color, Color.Snow);
1954
1955                         try {
1956                                 pen.Color = Color.Snow;
1957                                 Fail ("P127#3: must throw ArgumentException");
1958                         } catch (ArgumentException) {
1959                                 Assert ("P127#3", true);
1960                         }
1961                 }
1962
1963                 [Test]
1964                 public void TestSpringGreen ()
1965                 {
1966                         Pen pen = Pens.SpringGreen;
1967                         AssertEquals ("P128#1", pen.PenType, PenType.SolidColor);
1968                         AssertEquals ("P128#2", pen.Color, Color.SpringGreen);
1969
1970                         try {
1971                                 pen.Color = Color.SpringGreen;
1972                                 Fail ("P128#3: must throw ArgumentException");
1973                         } catch (ArgumentException) {
1974                                 Assert ("P128#3", true);
1975                         }
1976                 }
1977
1978                 [Test]
1979                 public void TestSteelBlue ()
1980                 {
1981                         Pen pen = Pens.SteelBlue;
1982                         AssertEquals ("P129#1", pen.PenType, PenType.SolidColor);
1983                         AssertEquals ("P129#2", pen.Color, Color.SteelBlue);
1984
1985                         try {
1986                                 pen.Color = Color.SteelBlue;
1987                                 Fail ("P129#3: must throw ArgumentException");
1988                         } catch (ArgumentException) {
1989                                 Assert ("P129#3", true);
1990                         }
1991                 }
1992
1993                 [Test]
1994                 public void TestTan ()
1995                 {
1996                         Pen pen = Pens.Tan;
1997                         AssertEquals ("P130#1", pen.PenType, PenType.SolidColor);
1998                         AssertEquals ("P130#2", pen.Color, Color.Tan);
1999
2000                         try {
2001                                 pen.Color = Color.Tan;
2002                                 Fail ("P130#3: must throw ArgumentException");
2003                         } catch (ArgumentException) {
2004                                 Assert ("P130#3", true);
2005                         }
2006                 }
2007
2008                 [Test]
2009                 public void TestTeal ()
2010                 {
2011                         Pen pen = Pens.Teal;
2012                         AssertEquals ("P131#1", pen.PenType, PenType.SolidColor);
2013                         AssertEquals ("P131#2", pen.Color, Color.Teal);
2014
2015                         try {
2016                                 pen.Color = Color.Teal;
2017                                 Fail ("P131#3: must throw ArgumentException");
2018                         } catch (ArgumentException) {
2019                                 Assert ("P131#3", true);
2020                         }
2021                 }
2022
2023                 [Test]
2024                 public void TestThistle ()
2025                 {
2026                         Pen pen = Pens.Thistle;
2027                         AssertEquals ("P132#1", pen.PenType, PenType.SolidColor);
2028                         AssertEquals ("P132#2", pen.Color, Color.Thistle);
2029
2030                         try {
2031                                 pen.Color = Color.Thistle;
2032                                 Fail ("P132#3: must throw ArgumentException");
2033                         } catch (ArgumentException) {
2034                                 Assert ("P132#3", true);
2035                         }
2036                 }
2037
2038                 [Test]
2039                 public void TestTomato ()
2040                 {
2041                         Pen pen = Pens.Tomato;
2042                         AssertEquals ("P133#1", pen.PenType, PenType.SolidColor);
2043                         AssertEquals ("P133#2", pen.Color, Color.Tomato);
2044
2045                         try {
2046                                 pen.Color = Color.Tomato;
2047                                 Fail ("P133#3: must throw ArgumentException");
2048                         } catch (ArgumentException) {
2049                                 Assert ("P133#3", true);
2050                         }
2051                 }
2052
2053                 [Test]
2054                 public void TestTransparent ()
2055                 {
2056                         Pen pen = Pens.Transparent;
2057                         AssertEquals ("P134#1", pen.PenType, PenType.SolidColor);
2058                         AssertEquals ("P134#2", pen.Color, Color.Transparent);
2059
2060                         try {
2061                                 pen.Color = Color.Transparent;
2062                                 Fail ("P134#3: must throw ArgumentException");
2063                         } catch (ArgumentException) {
2064                                 Assert ("P134#3", true);
2065                         }
2066                 }
2067
2068                 [Test]
2069                 public void TestTurquoise ()
2070                 {
2071                         Pen pen = Pens.Turquoise;
2072                         AssertEquals ("P135#1", pen.PenType, PenType.SolidColor);
2073                         AssertEquals ("P135#2", pen.Color, Color.Turquoise);
2074
2075                         try {
2076                                 pen.Color = Color.Turquoise;
2077                                 Fail ("P135#3: must throw ArgumentException");
2078                         } catch (ArgumentException) {
2079                                 Assert ("P135#3", true);
2080                         }
2081                 }
2082
2083                 [Test]
2084                 public void TestViolet ()
2085                 {
2086                         Pen pen = Pens.Violet;
2087                         AssertEquals ("P136#1", pen.PenType, PenType.SolidColor);
2088                         AssertEquals ("P136#2", pen.Color, Color.Violet);
2089
2090                         try {
2091                                 pen.Color = Color.Violet;
2092                                 Fail ("P136#3: must throw ArgumentException");
2093                         } catch (ArgumentException) {
2094                                 Assert ("P136#3", true);
2095                         }
2096                 }
2097
2098                 [Test]
2099                 public void TestWheat ()
2100                 {
2101                         Pen pen = Pens.Wheat;
2102                         AssertEquals ("P137#1", pen.PenType, PenType.SolidColor);
2103                         AssertEquals ("P137#2", pen.Color, Color.Wheat);
2104
2105                         try {
2106                                 pen.Color = Color.Wheat;
2107                                 Fail ("P137#3: must throw ArgumentException");
2108                         } catch (ArgumentException) {
2109                                 Assert ("P137#3", true);
2110                         }
2111                 }
2112
2113                 [Test]
2114                 public void TestWhite ()
2115                 {
2116                         Pen pen = Pens.White;
2117                         AssertEquals ("P138#1", pen.PenType, PenType.SolidColor);
2118                         AssertEquals ("P138#2", pen.Color, Color.White);
2119
2120                         try {
2121                                 pen.Color = Color.White;
2122                                 Fail ("P138#3: must throw ArgumentException");
2123                         } catch (ArgumentException) {
2124                                 Assert ("P138#3", true);
2125                         }
2126                 }
2127
2128                 [Test]
2129                 public void TestWhiteSmoke ()
2130                 {
2131                         Pen pen = Pens.WhiteSmoke;
2132                         AssertEquals ("P139#1", pen.PenType, PenType.SolidColor);
2133                         AssertEquals ("P139#2", pen.Color, Color.WhiteSmoke);
2134
2135                         try {
2136                                 pen.Color = Color.WhiteSmoke;
2137                                 Fail ("P139#3: must throw ArgumentException");
2138                         } catch (ArgumentException) {
2139                                 Assert ("P139#3", true);
2140                         }
2141                 }
2142
2143                 [Test]
2144                 public void TestYellow ()
2145                 {
2146                         Pen pen = Pens.Yellow;
2147                         AssertEquals ("P140#1", pen.PenType, PenType.SolidColor);
2148                         AssertEquals ("P140#2", pen.Color, Color.Yellow);
2149
2150                         try {
2151                                 pen.Color = Color.Yellow;
2152                                 Fail ("P140#3: must throw ArgumentException");
2153                         } catch (ArgumentException) {
2154                                 Assert ("P140#3", true);
2155                         }
2156                 }
2157
2158                 [Test]
2159                 public void TestYellowGreen ()
2160                 {
2161                         Pen pen = Pens.YellowGreen;
2162                         AssertEquals ("P141#1", pen.PenType, PenType.SolidColor);
2163                         AssertEquals ("P141#2", pen.Color, Color.YellowGreen);
2164
2165                         try {
2166                                 pen.Color = Color.YellowGreen;
2167                                 Fail ("P141#3: must throw ArgumentException");
2168                         } catch (ArgumentException) {
2169                                 Assert ("P141#3", true);
2170                         }
2171                 }
2172         }
2173 }
2174
2175 // Following code was used to generate the test methods above
2176 //
2177 //Type type = typeof (Pens);
2178 //PropertyInfo [] properties = type.GetProperties ();
2179 //int count = 1;
2180 //foreach (PropertyInfo property in properties) {
2181 //      Console.WriteLine();
2182 //      Console.WriteLine("\t\t[Test]");
2183 //      Console.WriteLine("\t\tpublic void Test" + property.Name + " ()");
2184 //      Console.WriteLine("\t\t{");
2185 //      Console.WriteLine("\t\t\tPen pen = Pens." + property.Name + ";");
2186 //      Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#1\", pen.PenType, PenType.SolidColor);");
2187 //      Console.WriteLine("\t\t\tAssertEquals (\"P" + count + "#2\", pen.Color, Color." + property.Name + ");\n");
2188 //
2189 //      Console.WriteLine("\t\t\ttry {");
2190 //      Console.WriteLine("\t\t\t\tpen.Color = Color." + property.Name + ";");
2191 //      Console.WriteLine("\t\t\t\tFail (\"P" + count + "#3: must throw ArgumentException\");");
2192 //      Console.WriteLine("\t\t\t} catch (ArgumentException) {");
2193 //      Console.WriteLine("\t\t\t\tAssert (\"P" + count + "#3\", true);");
2194 //      Console.WriteLine("\t\t\t}");
2195 //      Console.WriteLine("\t\t}");
2196 //      count++;
2197 //}