KickJava   Java API By Example, From Geeks To Geeks.

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


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

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