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