2 // System.Globalization.RegionInfoTest.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // (c) 2007 Novell, Inc. (http://www.novell.com)
10 using NUnit
.Framework
;
13 using System
.Globalization
;
14 using System
.Threading
;
16 namespace MonoTests
.System
.Globalization
19 public class RegionInfoTest
22 public void RegionByName ()
24 string [] names
= new string [] {
25 "AR", "ES", "HK", "TW", "US"};
27 foreach (string name
in names
)
28 new RegionInfo (name
);
33 public void RegionByWrongName ()
35 string [] names
= new string [] {
38 foreach (string name
in names
) {
40 new RegionInfo (name
);
41 Assert
.Fail ("should be invalid: " + name
);
42 } catch (ArgumentException
) {
50 [ExpectedException (typeof (ArgumentException
))]
52 public void RegionByLocaleName ()
54 string [] names
= new string [] {
57 foreach (string name
in names
)
58 new RegionInfo (name
);