This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
Support
dfurodet edited this page Nov 23, 2011
·
2 revisions
If you encounter any issue with Lmock, please contact us by sending an e-mail to lmock@vmware.com. You may help by providing a trace dump of the framework using the following method:
- Statically import the Lmock trace module
com.vmware.lmock.trace.Trace
- Create an
ActivityLogger
that will be invoked by Lmock to produce traces. Such a logger should invoke your own built-in logging method, relying - for example - onSystem.out.println
, alogger
, theLog
primitives in Android... - Call
Trace.reportActivityTo
so that Lmock actually traces out its activity, using your built-in logger
Next is an example:
import static com.vmware.lmock.trace.Trace.*;
import com.vmware.lmock.trace.ActivityLogger;
...
class MyTest {
// An activity logger using System.out.println:
private static final ActivityLogger activityLogger = new ActivityLogger() {
public void trace(String string) {
System.out.println(string);
}
};
...
public void test() {
// Plug the activity logger to Lmock
reportActivityTo(activityLogger);
begin();
...
}