public void noEstaVacioCuandoContieneElementos() { Stack stack = new Stack(); stack.Push(1); bool isEmpty = stack.IsEmpty; Assert.IsFalse(isEmpty); }
public void Test() { Stack stack = new Stack(); Assert.IsTrue(stack.IsEmpty); //Test behaviour N°1 stack.Push(1); Assert.IsFalse(stack.IsEmpty); //Test behaviour N°2 Assert.AreEqual(1, stack.Pop()); //Test behaviour N°3 }