Exemple #1
0
        public void Test_Find_WhenListIsEmpty()
        {
            var list = new TwoWayList <int>();

            list.Find(3);
            Assert.AreEqual(OperationStatus.OK, list.FindStatus);
        }
Exemple #2
0
        public void Test_Find_WhenCursorNoElementAfter()
        {
            var list = new TwoWayList <int>();

            list.AddTail(1);
            list.AddTail(2);
            list.Find(3);
            Assert.AreEqual(OperationStatus.OK, list.FindStatus);
            Assert.AreEqual(list.Value(), 1);
        }
Exemple #3
0
        public void Test_Find_WhenValueEqualsCurrent()
        {
            var list = new TwoWayList <int>();

            list.AddTail(1);
            list.AddTail(2);
            list.AddTail(2);
            list.AddTail(3);
            list.Find(1);
            Assert.AreEqual(OperationStatus.OK, list.FindStatus);
            Assert.AreEqual(list.Value(), 1);
        }