Merge pull request #1991 from esdrubal/seq_test_fix
[mono.git] / mcs / class / corlib / Test / System / TimeZoneInfoTest.cs
index 87a3583f3777c1de31e35471864fee387f8a6128..8648e22df7fb5c482166a760f4c31af2c97134bb 100644 (file)
@@ -711,6 +711,15 @@ namespace MonoTests.System
                                }
                                Assert.Fail ("Europe/Brussels not found in SystemTZ");
                        }
+
+                       [Test]
+                       public void ReflectionReturnsTheCorrectMethod ()
+                       {
+                               var method = (MethodInfo) typeof (TimeZoneInfo).GetMember ("GetSystemTimeZones", MemberTypes.Method, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)[0];
+
+                               var timeZones = (global::System.Collections.ObjectModel.ReadOnlyCollection<TimeZoneInfo>) method.Invoke (null, null);
+                               Assert.IsTrue (timeZones.Count > 0, "GetSystemTimeZones should not return an empty collection.");
+                       }
                }
                
                [TestFixture]