Exemplo n.º 1
0
 @Test
 public void shouldReturnInfixNotation() {
   negOperation = new NEG(new CASNumber(5));
   assertEquals("(-5)", negOperation.toInfixNotation());
 }
Exemplo n.º 2
0
 @Test
 public void shouldReturnPositiveValue() {
   negOperation = new NEG(new CASNumber(-3));
   assertEquals(3, negOperation.getValue());
 }
Exemplo n.º 3
0
 @Test
 public void shouldReturnRepresentation() {
   negOperation = new NEG(new CASNumber(5));
   assertEquals("NEG(5)", negOperation.getRepresentation());
 }
Exemplo n.º 4
0
 @Test
 public void shouldReturnNegativeValue() {
   negOperation = new NEG(new CASNumber(5));
   assertEquals(-5, negOperation.getValue());
 }