Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic
In directory sc8-pr-cvs1:/tmp/cvs-serv24592/src/core/com/mockobjects/dynamic
Modified Files:
Tag: DynamicMockExperiment
Mock.java
Log Message:
Replaced long with int to avoid downcast exceptions
Index: Mock.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/dynamic/Mock.java,v
retrieving revision 1.16.2.6
retrieving revision 1.16.2.7
diff -u -r1.16.2.6 -r1.16.2.7
--- Mock.java 16 Apr 2003 16:31:43 -0000 1.16.2.6
+++ Mock.java 16 Apr 2003 22:15:47 -0000 1.16.2.7
@@ -114,8 +114,8 @@
this.expectAndReturn(methodName, new Boolean(result));
}
- public void expectAndReturn(String methodName, long result) {
- this.expectAndReturn(methodName, new Long(result));
+ public void expectAndReturn(String methodName, int result) {
+ this.expectAndReturn(methodName, new Integer(result));
}
public void expectAndReturn(String methodName, Object singleEqualArg, Object result) {
@@ -126,8 +126,8 @@
this.expectAndReturn(methodName, singleEqualArg, new Boolean(result));
}
- public void expectAndReturn(String methodName, Object singleEqualArg, long result) {
- this.expectAndReturn(methodName, singleEqualArg, new Long(result));
+ public void expectAndReturn(String methodName, Object singleEqualArg, int result) {
+ this.expectAndReturn(methodName, singleEqualArg, new Integer(result));
}
public void expectAndReturn(String methodName, Constraint[] args, Object result) {
@@ -138,8 +138,8 @@
this.expectAndReturn(methodName, args, new Boolean(result));
}
- public void expectAndReturn(String methodName, Constraint[] args, long result) {
- this.expectAndReturn(methodName, args, new Long(result));
+ public void expectAndReturn(String methodName, Constraint[] args, int result) {
+ this.expectAndReturn(methodName, args, new Integer(result));
}
public void expectAndThrow(String methodName, Throwable exception) {
@@ -162,8 +162,8 @@
this.matchAndReturn(methodName, new Boolean(result));
}
- public void matchAndReturn(String methodName, long result) {
- this.matchAndReturn(methodName, new Long(result));
+ public void matchAndReturn(String methodName, int result) {
+ this.matchAndReturn(methodName, new Integer(result));
}
public void matchAndReturn(String methodName, Object singleEqualArg, Object result) {
@@ -174,16 +174,16 @@
this.matchAndReturn(methodName, new Boolean(singleEqualArg), result);
}
- public void matchAndReturn(String methodName, long singleEqualArg, Object result) {
- this.matchAndReturn(methodName, new Long(singleEqualArg), result);
+ public void matchAndReturn(String methodName, int singleEqualArg, Object result) {
+ this.matchAndReturn(methodName, new Integer(singleEqualArg), result);
}
public void matchAndReturn(String methodName, Object singleEqualArg, boolean result) {
this.matchAndReturn(methodName, singleEqualArg, new Boolean(result));
}
- public void matchAndReturn(String methodName, Object singleEqualArg, long result) {
- this.matchAndReturn(methodName, singleEqualArg, new Long(result));
+ public void matchAndReturn(String methodName, Object singleEqualArg, int result) {
+ this.matchAndReturn(methodName, singleEqualArg, new Integer(result));
}
public void matchAndReturn(String methodName, Constraint[] args, Object result) {
@@ -194,8 +194,8 @@
this.matchAndReturn(methodName, args, new Boolean(result));
}
- public void matchAndReturn(String methodName, Constraint[] args, long result) {
- this.matchAndReturn(methodName, args, new Long(result));
+ public void matchAndReturn(String methodName, Constraint[] args, int result) {
+ this.matchAndReturn(methodName, args, new Integer(result));
}
public void matchAndThrow(String methodName, Throwable throwable) {
@@ -210,8 +210,8 @@
this.matchAndThrow(methodName,new Boolean(singleEqualArg), throwable);
}
- public void matchAndThrow(String methodName, long singleEqualArg, Throwable throwable) {
- this.matchAndThrow(methodName,new Long(singleEqualArg), throwable);
+ public void matchAndThrow(String methodName, int singleEqualArg, Throwable throwable) {
+ this.matchAndThrow(methodName,new Integer(singleEqualArg), throwable);
}
public void matchAndThrow(String methodName, Constraint[] args, Throwable throwable) {
|