Exemplo n.º 1
0
        public void TestMoveFalse()
        {
            var list = new ListIterator();

            Assert.That(() => list.Move(), Is.EqualTo(false));
        }
        public void TestMoveMethod()
        {
            bool result = systemUnderTest.Move();

            Assert.AreEqual("True", result.ToString(), "Expect To Move In Right Direction.");
        }
 public void TestMoveMethodAtTheEndOfTheCollection()
 {
     Assert.IsFalse(iterator.Move(), "List is not empty.");
 }
Exemplo n.º 4
0
        public void Execute(ref ListIterator list)
        {
            string result = list.Move().ToString();

            Console.WriteLine(result);
        }
Exemplo n.º 5
0
        public void TestIfMoveReturnsTrue()
        {
            ListIterator listIterator = new ListIterator(new string[] { "Gosho", "Pesho" });

            Assert.AreEqual(listIterator.Move(), true);
        }
        public void TestMoveMethod_TrueOutput(string[] values)
        {
            ListIterator <string> list = new ListIterator <string>(values);

            Assert.That(() => list.Move(), Is.EqualTo(true));
        }
 public void MovingSuccessfulToNextElement()
 {
     listIterator.Move();
     Assert.That(listIterator.Move(), Is.EqualTo(true));
 }
 public void HasNextCommandReturnsFalseWhenIndexIsAtTheEndOfTheList()
 {
     iterator = new ListIterator(input);
     iterator.Move();
     Assert.That(() => iterator.HasNext(), Is.EqualTo(false));
 }
Exemplo n.º 9
0
    public void MoveTest_ReturnsTrue()
    {
        ListIterator listIterator = new ListIterator(new string[] { "Stefcho", "Goshky" });

        Assert.That(listIterator.Move(), Is.EqualTo(true));
    }
 public void MoveCommandReturnsFalseAtEndOfList()
 {
     iterator = new ListIterator(input);
     iterator.Move();
     Assert.That(() => iterator.Move(), Is.EqualTo(false));
 }
 public void PrintCommandPrintsLastIndexedName()
 {
     iterator = new ListIterator(input);
     iterator.Move();
     Assert.That(() => iterator.Print(), Is.EqualTo("Gosho"));
 }
 public void MoveCommandMovesInternalIndexToNextPosition()
 {
     iterator = new ListIterator(input);
     Assert.That(() => iterator.Move(), Is.EqualTo(true));
 }
 public void IteratorIsCreatedSuccesfullyWithEmptyInput()
 {
     iterator = new ListIterator();
     Assert.That(() => iterator.Move(), Is.EqualTo(false));
 }
 public void MoveShouldReturnTrueOnceAndFalseOnceWithTwoElements()
 {
     Assert.IsTrue(twoElementsInList.Move());
     Assert.IsFalse(twoElementsInList.Move());
 }
 public void MoveIncreaseIndexWithOne()
 {
     Assert.IsTrue(list.Move());
     Assert.IsTrue(list.Index == 1);
 }
Exemplo n.º 16
0
        public void AttemptToMoveToNextIndex()
        {
            ListIterator iterator = new ListIterator("one", "two");

            Assert.That(() => iterator.Move(), Is.True);
        }