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