bool Ticked;\r
\r
[Test ()]\r
-#if NET_2_0\r
[ExpectedException (typeof (ArgumentOutOfRangeException))]\r
-#else\r
- [ExpectedException (typeof (ArgumentException))]\r
-#endif\r
public void IntervalException1 ()\r
{\r
Timer timer = new Timer ();\r
}\r
\r
[Test ()]\r
-#if NET_2_0\r
[ExpectedException (typeof (ArgumentOutOfRangeException))]\r
-#else\r
- [ExpectedException (typeof (ArgumentException), "'-1' is not a valid value for Interval. Interval must be greater than 0.")]\r
-#endif\r
public void IntervalException2 ()\r
{\r
Timer timer = new Timer ();\r
}\r
\r
[Test ()]\r
-#if NET_2_0\r
[ExpectedException (typeof (ArgumentOutOfRangeException))]\r
-#else\r
- [ExpectedException (typeof (ArgumentException), "'-2147483648' is not a valid value for Interval. Interval must be greater than 0.")]\r
-#endif\r
public void IntervalException4 ()\r
{\r
Timer timer = new Timer ();\r
}\r
}\r
\r
-#if NET_2_0\r
[Test]\r
public void TagTest ()\r
{\r
timer.Tag = "a";\r
Assert.AreEqual ("a", timer.Tag, "1");\r
}\r
-#endif\r
\r
/* Application.DoEvents and Sleep are not guarenteed on Linux\r
[Test]\r
Assert.AreEqual (false, timer.Enabled, "E1");\r
Assert.AreEqual (100, timer.Interval, "I1");\r
Assert.AreEqual (null, timer.Site, "S1");\r
-#if NET_2_0\r
Assert.AreEqual (null, timer.Tag, "T1");\r
-#endif\r
}\r
\r
[Test] // bug #325033\r