Renamed to simply GetObjectOnRow and dropped unused X component

This commit is contained in:
Thomas
2022-05-13 22:37:01 +01:00
parent 6800113ff1
commit 7deacf3bb9
3 changed files with 17 additions and 17 deletions

View File

@@ -721,7 +721,7 @@ namespace Terminal.Gui.Views {
}
[Fact, AutoInitShutdown]
public void TestGetObjectAtPoint ()
public void TestGetObjectOnRow ()
{
var tv = new TreeView { Width = 20, Height = 10 };
@@ -746,11 +746,11 @@ namespace Terminal.Gui.Views {
└─pink
", output);
Assert.Same (n1, tv.GetObjectAtPoint (new Point (0, 0)));
Assert.Same (n1_1, tv.GetObjectAtPoint (new Point (0, 1)));
Assert.Same (n1_2, tv.GetObjectAtPoint (new Point (0, 2)));
Assert.Same (n2, tv.GetObjectAtPoint (new Point (0, 3)));
Assert.Null (tv.GetObjectAtPoint (new Point (0, 4)));
Assert.Same (n1, tv.GetObjectOnRow (0));
Assert.Same (n1_1, tv.GetObjectOnRow (1));
Assert.Same (n1_2, tv.GetObjectOnRow (2));
Assert.Same (n2, tv.GetObjectOnRow (3));
Assert.Null (tv.GetObjectOnRow (4));
tv.Collapse (n1);
@@ -762,11 +762,11 @@ namespace Terminal.Gui.Views {
└─pink
", output);
Assert.Same (n1, tv.GetObjectAtPoint (new Point (0, 0)));
Assert.Same (n2, tv.GetObjectAtPoint (new Point (0, 1)));
Assert.Null (tv.GetObjectAtPoint (new Point (0, 2)));
Assert.Null (tv.GetObjectAtPoint (new Point (0, 3)));
Assert.Null (tv.GetObjectAtPoint (new Point (0, 4)));
Assert.Same (n1, tv.GetObjectOnRow (0));
Assert.Same (n2, tv.GetObjectOnRow (1));
Assert.Null (tv.GetObjectOnRow (2));
Assert.Null (tv.GetObjectOnRow (3));
Assert.Null (tv.GetObjectOnRow (4));
}
[Fact, AutoInitShutdown]