|
|||||||||
| Home >> All >> com >> mockobjects >> examples >> [ calcserver overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mockobjects.examples.calcserver
Class MockCalculator

java.lang.Objectcom.mockobjects.MockObject
com.mockobjects.examples.calcserver.MockCalculator
- All Implemented Interfaces:
- IntCalculator, com.mockobjects.Verifiable
- public class MockCalculator
- extends com.mockobjects.MockObject
- implements IntCalculator
- extends com.mockobjects.MockObject
| Field Summary | |
private java.lang.String |
myBadOperation
|
private com.mockobjects.ExpectationValue |
myOperation
|
private int |
myResult
|
private com.mockobjects.ExpectationValue |
myValue1
|
private com.mockobjects.ExpectationValue |
myValue2
|
| Constructor Summary | |
MockCalculator()
MockCalculator constructor comment. |
|
| Method Summary | |
int |
calculate(int value1,
int value2,
java.lang.String operation)
|
void |
setExpectedCalculation(int value1,
int value2,
java.lang.String operation)
|
void |
setupResult(int result)
|
void |
setupThrowBadOperation(java.lang.String opName)
|
void |
verify()
Throw an AssertionFailedException if any expectations have not been met. |
| Methods inherited from class com.mockobjects.MockObject |
assertEquals, assertEquals, assertTrue, fail, notImplemented, notYetImplemented, notYetImplemented |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
myResult
private int myResult
myValue1
private com.mockobjects.ExpectationValue myValue1
myValue2
private com.mockobjects.ExpectationValue myValue2
myOperation
private com.mockobjects.ExpectationValue myOperation
myBadOperation
private java.lang.String myBadOperation
| Constructor Detail |
MockCalculator
public MockCalculator()
- MockCalculator constructor comment.
| Method Detail |
calculate
public int calculate(int value1,
int value2,
java.lang.String operation)
throws CalculatorException
- Specified by:
calculatein interfaceIntCalculator
setExpectedCalculation
public void setExpectedCalculation(int value1,
int value2,
java.lang.String operation)
setupResult
public void setupResult(int result)
setupThrowBadOperation
public void setupThrowBadOperation(java.lang.String opName)
verify
public void verify()
- Description copied from interface:
com.mockobjects.Verifiable - Throw an AssertionFailedException if any expectations have not been met.
- Specified by:
verifyin interfacecom.mockobjects.Verifiable
|
|||||||||
| Home >> All >> com >> mockobjects >> examples >> [ calcserver overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC