KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > jmock > examples > calculator > expression > AdditionTest


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package test.jmock.examples.calculator.expression;
4
5
6 import org.jmock.examples.calculator.Expression;
7 import org.jmock.examples.calculator.expression.Addition;
8
9
10 public class AdditionTest extends AbstractBinaryOperatorTest
11 {
12
13     public void testAddsLeftAndRightSubexpressions() throws Exception JavaDoc {
14         runOperatorTest();
15     }
16
17     protected double expectedValue( double left, double right ) {
18         return left + right;
19     }
20
21     protected Expression makeExpression( Expression left, Expression right ) {
22         return new Addition(left, right);
23     }
24 }
25
Popular Tags