public void MoveToNextMemberTest() { var incanvasSearch = new Dynamo.UI.Controls.InCanvasSearchControl(); var next_index = incanvasSearch.MoveToNextMember(true, members, members.ElementAt(0)); Assert.AreEqual(1, next_index); Assert.AreEqual("B", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(true, members, members.ElementAt(1)); Assert.AreEqual(2, next_index); Assert.AreEqual("C", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(false, members, members.ElementAt(2)); Assert.AreEqual(1, next_index); Assert.AreEqual("B", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(false, members, members.ElementAt(1)); Assert.AreEqual(0, next_index); Assert.AreEqual("A", members[next_index].Name); }
public void MoveToNextMemberTest() { var incanvasSearch = new Dynamo.UI.Controls.InCanvasSearchControl(); var next_index = incanvasSearch.MoveToNextMember(true, members, members.ElementAt(0)); Assert.AreEqual(1, next_index); Assert.AreEqual("B", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(true, members, members.ElementAt(1)); Assert.AreEqual(2, next_index); Assert.AreEqual("C", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(false, members, members.ElementAt(2)); Assert.AreEqual(1, next_index); Assert.AreEqual("B", members[next_index].Name); next_index = incanvasSearch.MoveToNextMember(false, members, members.ElementAt(1)); Assert.AreEqual(0, next_index); Assert.AreEqual("A", members[next_index].Name); }