}
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]