public void TestPop() { Stack.Stacker s = new Stack.Stacker(); s.Push("Object1"); s.Pop(); Assert.True(s.IsEmpty()); }
public void TestPopEqualsTop() { Stack.Stacker s = new Stack.Stacker(); String line1 = "Object1"; s.Push(line1); AssertionException.Equals(s.Top(), line1); }
public void TestTop() { Stack.Stacker s = new Stack.Stacker(); String line1 = "Object1"; s.Push(line1); AssertionException.Equals(s.Top(), line1); Assert.False(s.IsEmpty()); }
public void TestPopEqualsPushThreeTimes() { Stack.Stacker s = new Stack.Stacker(); String line1 = "Object1"; String line2 = "Object2"; String line3 = "Object3"; s.Push(line1); s.Push(line1); s.Push(line1); AssertionException.Equals(s.Pop(), line3); AssertionException.Equals(s.Pop(), line2); AssertionException.Equals(s.Pop(), line1); }
public void TestTopOfEmptyStack() { Stack.Stacker s = new Stack.Stacker(); Assert.Null(s.Top()); }
public void TestIsEmpty() { Stack.Stacker s = new Stack.Stacker(); Assert.True(s.IsEmpty()); }
public void TestPushNullEqualsTop() { Stack.Stacker s = new Stack.Stacker(); s.Push(null); AssertionException.Equals(s.Top(), null); }
public void TestPushNull() { Stack.Stacker s = new Stack.Stacker(); s.Push(null); Assert.False(s.IsEmpty()); }