Remote
, RemoteInterface
public class InstrumentedClass extends Object implements RemoteInterface
Modifier and Type | Method | Description |
---|---|---|
void |
assertKnownInstances(int count) |
Checks that the number of known, distinct object instances of this class is as stated.
|
void |
assertMethodCallCount(String methodName,
int callCount) |
Checks that the number of known invocations of the given method is specified count.
|
void |
assertMethodCallCount(String message,
String methodName,
int callCount) |
Checks that the number of known invocations of the given method is specified count.
|
void |
assertMethodCallCount(String message,
String methodName,
CallCount callCount) |
Checks that the number of known invocations of the given method falls within the specified
range for each known instances of the class.
|
void |
assertMethodCalled(String methodName) |
Checks that the given method has been called at least once on each known instance of the class.
|
void |
assertMethodNotCalled(String methodName) |
Checks that the given method has not been seen to be called on any known instance of the class.
|
void |
assertSumMethodCallCount(String method,
int callCount) |
Check that number of known invocations of the given method of all known instances
is specified count.
Difference against assertMethodCallCount(String, int) is that here we query
against all know instances. |
Set<InstrumentedInstance> |
getInstances() |
Returns the set of known instances of the class.
|
int |
getInvocationCount(String methodName) |
Returns number of method calls for the class.
Sum number of method calls on all instrumented instances belonging to this instrumented class. |
void |
trace(String methodName,
Object[] args) |
Receiving side of the remote communication between the test code and the BytemanTestHelper.
|
public void trace(String methodName, Object[] args) throws RemoteException
trace
in interface RemoteInterface
methodName
- the method name that was traced.args
- the arguments to the method invocation, in String form.RemoteException
- in case of communication failure.BytemanTestHelper.remoteTrace(String, String, Object[])
public Set<InstrumentedInstance> getInstances()
public int getInvocationCount(String methodName)
methodName
- name of method which we are interested in how many times was calledpublic void assertKnownInstances(int count)
count
- the expected number of instances of the class.public void assertMethodCallCount(String message, String methodName, CallCount callCount)
message
- the message to print in case of assertion failure.methodName
- the method name to look for.callCount
- the expected range for the invocation count.public void assertMethodCallCount(String message, String methodName, int callCount)
message
- the message to print in case of assertion failure.methodName
- the method name to look for.callCount
- the expected number of the invocation count.public void assertMethodCallCount(String methodName, int callCount)
methodName
- the method name to look for.callCount
- the expected number of the invocation count.public void assertSumMethodCallCount(String method, int callCount)
assertMethodCallCount(String, int)
is that here we query
against all know instances. The other method query each instance to be called
by the specific number times.method
- the method name to look forcallCount
- the expected number of the invocation count summed on all instancespublic void assertMethodCalled(String methodName)
methodName
- the method name to look for.public void assertMethodNotCalled(String methodName)
methodName
- the method name to look for.Copyright © 2018. All rights reserved.