package testCal;

import static org.junit.Assert.*;
import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import cal.InputHandler;

public class InputHandlerTest {

  private InputHandler inputHandler;
  
  @Before
  public void setUp() throws Exception {
    inputHandler = new InputHandler();
    
  }

  @After
  public void tearDown() throws Exception {
    inputHandler = null;
  }

  @Test
  public void testIsExpression1() {
    boolean expected = true;
    boolean actual = inputHandler.setInput("1");
    assertEquals(expected, actual);
  }

  @Test
  public void testIsExpression2() {
    boolean expected = true;
    boolean actual = inputHandler.setInput("10+1-1*100/10");
    assertEquals(expected, actual);
  }
  
  @Test
  public void testIsExpression3() {
    boolean expected = true;
    boolean actual = inputHandler.setInput("(1+22)*3");
    assertEquals(expected, actual);
  }
  
  @Test
  public void testIsExpression4() {
    boolean expected = true;
    boolean actual = inputHandler.setInput("(-1)-1");
    assertEquals(expected, actual);
  }
  
  @Test
  public void testIsExpression5() {
    boolean expected = true;
    boolean actual = inputHandler.setInput("2.11*3.99999");
    assertEquals(expected, actual);
  }
  

}

@@ -1290,11 +1290,351 @@
 %0A  %7D%0A  %0A
+  @Test%0A  public void testIsExpression6() %7B%0A    boolean expected = true;%0A    boolean actual = inputHandler.setInput(%221*(22+3.33)%22);%0A    assertEquals(expected, actual);%0A  %7D%0A%0A  @Test%0A  public void testIsExpression7() %7B%0A    boolean expected = true;%0A    boolean actual = inputHandler.setInput(%221*(2+3)%22);%0A    assertEquals(expected, actual);%0A  %7D
 %0A%7D%0A

Add test case for input handler where it cannot pass