public void If_the_stack_is_not_epty_the_cout_return_nonzero() { var stack = new LajtiStack(); stack.Push(1); Assert.That(stack.Count, Is.EqualTo(1)); stack.Push(2); Assert.That(stack.Count, Is.EqualTo(2)); }
public void When_put_two_items_to_the_stack_then_cout() { var stack = new LajtiStack(); stack.Push(123); stack.Push(456); var result = stack.Pop(); Assert.That(result, Is.EqualTo(456)); }
public void if_pop_the_last_elemet_of_stack_the_stack_does_not_contain_it_anymore() { var stack = new LajtiStack(); stack.Push(456); stack.Push(999); var result1 = stack.Pop(); var result2 = stack.Pop(); Assert.That(result2, Is.EqualTo(456)); }
public void if_peak_the_last_elemet_of_stack_the_stack_still_contain_it() { var stack = new LajtiStack(); stack.Push(456); stack.Push(999); var result1 = stack.Peek(); var result2 = stack.Peek(); Assert.That(result1, Is.EqualTo(999)); Assert.That(result2, Is.EqualTo(999)); }
public void whent_the_stack_notepty_the_IsEmpty_is_false() { var stack = new LajtiStack(); stack.Push(456); Assert.That(stack.IsEmpty, Is.False); }
public void WhenAnItemIsAddedToTheStackThenTheNumberOfItemsIsOneAndtheStackIsNotEmptyAnyMore() { var stack = new LajtiStack(); stack.Push(123); Assert.That(stack.IsEmpty, Is.False); }
public void if_the_stack_lenght_is_one_and_pop_that_the_isEmpty_is_true() { var stack = new LajtiStack(); stack.Push(456); stack.Pop(); Assert.That(stack.IsEmpty, Is.True); }
public void when_OneItem_Added_I_Can_Popp_It() { var stack = new LajtiStack(); stack.Push(123); var result = stack.Pop(); Assert.That(result, Is.EqualTo(123)); }