[bcl] Remove more NET_2_0 checks from class libs
[mono.git] / mcs / class / Managed.Windows.Forms / Test / System.Windows.Forms / TreeViewHitTestInfoTest.cs
1 //
2 // Copyright (c) 2007 Novell, Inc.
3 //
4 // Authors:
5 //     Jackson Harper (jackson@ximian.com)
6 //
7
8 using System;
9 using System.Windows.Forms;
10 using System.Drawing;
11 using System.Threading;
12 using System.ComponentModel;
13 using System.Runtime.Remoting;
14
15 using NUnit.Framework;
16
17 namespace MonoTests.System.Windows.Forms {
18
19         [TestFixture]
20         public class TreeViewHitTestInfoTest : TestHelper {
21
22                 [Test]
23                 public void TestCtor ()
24                 {
25                         TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.None);
26
27                         Assert.AreEqual (t.Node, null, "null-1");
28                         Assert.AreEqual (t.Location, TreeViewHitTestLocations.None, "null-2");
29
30                         t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.Image);
31
32                         Assert.AreEqual (t.Node, null, "loc-1");
33                         Assert.AreEqual (t.Location, TreeViewHitTestLocations.Image, "loc-2");
34
35                         TreeNode tn = new TreeNode ("test");
36                         t = new TreeViewHitTestInfo (tn, TreeViewHitTestLocations.PlusMinus);
37
38                         Assert.AreEqual (t.Node, tn, "node-1");
39                         Assert.AreEqual (t.Location, TreeViewHitTestLocations.PlusMinus);
40                 }
41
42                 [Test]
43                 public void TestBadLocation ()
44                 {
45                         TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, (TreeViewHitTestLocations) (-1));
46
47                         Assert.AreEqual (t.Node, null, "bad-loc-1");
48                         Assert.AreEqual ((int) t.Location, -1, "bad-loc-2");
49                 }
50         }
51
52 }