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