Update of /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14392/input/javasrc/biz/xsoftware/mock2
Modified Files:
MockObjectFactory.java MockObject.java
Added Files:
Messages.java
Log Message:
merge brachForOffice to HEAD
Index: MockObject.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/MockObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** MockObject.java 7 Jan 2006 15:13:39 -0000 1.2
--- MockObject.java 16 Feb 2006 15:37:35 -0000 1.3
***************
*** 141,146 ****
/**
* Verifies that the expected methods are called within the timeout.
*/
! public void verify();
/**
--- 141,149 ----
/**
* Verifies that the expected methods are called within the timeout.
+ * @param timeout
+ * the time set for waitting the call
+ * @throws InterruptedException
*/
! public void verify() throws InterruptedException;
/**
Index: MockObjectFactory.java
===================================================================
RCS file: /cvsroot/mocklib/mocklib2/input/javasrc/biz/xsoftware/mock2/MockObjectFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MockObjectFactory.java 13 Jan 2006 15:45:00 -0000 1.4
--- MockObjectFactory.java 16 Feb 2006 15:37:35 -0000 1.5
***************
*** 10,17 ****
*/
public abstract class MockObjectFactory {
!
private static MockObjectFactory singleton() {
! //fix this using reflection....
! return null;
}
--- 10,30 ----
*/
public abstract class MockObjectFactory {
!
!
private static MockObjectFactory singleton() {
! //fix this using reflection.... ClassLoader cl=MockObjectFactory.class.getClassLoader();
! MockObjectFactory factory=null;
! try{
! String className="biz.xsoftware.mock2.impl.MockObjectFactoryImpl";
! Class<? extends MockObjectFactory> c=Class.forName(className).asSubclass(MockObjectFactory.class);
! factory=c.newInstance();
! }catch(ClassNotFoundException e){
! throw new RuntimeException("create mockFactory failed", e);
! }catch(IllegalAccessException e){
! throw new RuntimeException("create mockFactory failed", e);
! }catch(InstantiationException e){
! throw new RuntimeException("create mockFactory failed", e);
! }
! return factory;
}
--- NEW FILE: Messages.java ---
package biz.xsoftware.mock2;
public class Messages {
private Messages() {}
public static final String VERIFY_NOT_CALLED = "MockObject.verify() must be called before accessing and of the methods on CalledMethod object";
}
|