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 when_the_stack_is_epty_then_the_peek_equal_to_exeption() { var stack = new LajtiStack(); Assert.Throws <InvalidOperationException>(() => stack.Peek()); }