public void IndexOf() { var layout1 = new CircularLayoutInfo { Radius = 1.0 }; var layout2 = new CircularLayoutInfo { Radius = 2.0 }; var layout3 = new CircularLayoutInfo { Radius = 3.0 }; var layout4 = new CircularLayoutInfo { Radius = 4.0 }; var fc = new FrontChain(); var node1 = fc.Add(layout1); var node2 = fc.Add(layout2); var node3 = fc.Add(layout3); var node4 = fc.Add(layout4); Assert.AreEqual(0, fc.IndexOf(node1)); Assert.AreEqual(1, fc.IndexOf(node2)); Assert.AreEqual(2, fc.IndexOf(node3)); Assert.AreEqual(3, fc.IndexOf(node4)); }
public void IndexOf_OnlyHead() { var layout1 = new CircularLayoutInfo { Radius = 1.0 }; var fc = new FrontChain(); var node1 = fc.Add(layout1); Assert.AreEqual(0, fc.IndexOf(node1)); }