Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. package org.elsys.postfix;
  2.  
  3. import java.util.EmptyStackException;
  4.  
  5. import org.junit.Test;
  6.  
  7. public class TernaryTest extends CalculatorAbstractTest {
  8.  
  9. @Test(expected = EmptyStackException.class)
  10. public void testWithNotEnoughValuesInStack() {
  11. input("11");
  12. input("\\*-\\*");
  13. inputCtrlC();
  14. runCalculator();
  15. }
  16.  
  17. @Test
  18. public void test() {
  19. input("10");
  20. input("10");
  21. input("10");
  22. input("\\*-\\*");
  23. //input("\\*");
  24. inputCtrlC();
  25. runCalculator();
  26. assertCalculatorLastValue(-1000);
  27. assertCalculatorStackSize(1);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement