KickJava   Java API By Example, From Geeks To Geeks.

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


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.Subtraction;
8
9
10 public class SubtractionTest extends AbstractBinaryOperatorTest
11 {
12
13     public void testSubtractsRightSubexpressionFromLeftSubexpression()
14             throws Exception JavaDoc {
15         runOperatorTest();
16     }
17
18     protected double expectedValue( double left, double right ) {
19         return left - right;
20     }
21
22     protected Expression makeExpression( Expression left, Expression right ) {
23         return new Subtraction(left, right);
24     }
25
26 }
27
Popular Tags