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;
18 namespace MonoTests.System.Windows.Forms {
21 public class TreeViewHitTestInfoTest : TestHelper {
24 public void TestCtor ()
26 TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.None);
28 Assert.AreEqual (t.Node, null, "null-1");
29 Assert.AreEqual (t.Location, TreeViewHitTestLocations.None, "null-2");
31 t = new TreeViewHitTestInfo (null, TreeViewHitTestLocations.Image);
33 Assert.AreEqual (t.Node, null, "loc-1");
34 Assert.AreEqual (t.Location, TreeViewHitTestLocations.Image, "loc-2");
36 TreeNode tn = new TreeNode ("test");
37 t = new TreeViewHitTestInfo (tn, TreeViewHitTestLocations.PlusMinus);
39 Assert.AreEqual (t.Node, tn, "node-1");
40 Assert.AreEqual (t.Location, TreeViewHitTestLocations.PlusMinus);
44 public void TestBadLocation ()
46 TreeViewHitTestInfo t = new TreeViewHitTestInfo (null, (TreeViewHitTestLocations) (-1));
48 Assert.AreEqual (t.Node, null, "bad-loc-1");
49 Assert.AreEqual ((int) t.Location, -1, "bad-loc-2");