2 // Copyright (c) 2007 Novell, Inc.
5 // Jackson Harper (jackson@ximian.com)
9 using System.Windows.Forms;
11 using System.Threading;
12 using System.ComponentModel;
13 using System.Runtime.Remoting;
15 using NUnit.Framework;
17 namespace MonoTests.System.Windows.Forms {
20 public class TreeViewHitTestInfoTest : TestHelper {
23 public void TestCtor ()
25 TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.None);
27 Assert.AreEqual (t.Node, null, "null-1");
28 Assert.AreEqual (t.Location, TreeViewHitTestLocations.None, "null-2");
30 t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.Image);
32 Assert.AreEqual (t.Node, null, "loc-1");
33 Assert.AreEqual (t.Location, TreeViewHitTestLocations.Image, "loc-2");
35 TreeNode tn = new TreeNode ("test");
36 t = new TreeViewHitTestInfo (tn, TreeViewHitTestLocations.PlusMinus);
38 Assert.AreEqual (t.Node, tn, "node-1");
39 Assert.AreEqual (t.Location, TreeViewHitTestLocations.PlusMinus);
43 public void TestBadLocation ()
45 TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, (TreeViewHitTestLocations) (-1));
47 Assert.AreEqual (t.Node, null, "bad-loc-1");
48 Assert.AreEqual ((int) t.Location, -1, "bad-loc-2");