Package org.jboss.byteman.contrib.dtest
Class InstrumentedInstance
- java.lang.Object
-
- org.jboss.byteman.contrib.dtest.InstrumentedInstance
-
public class InstrumentedInstance extends Object
InstrumentedInstance instances serve two purposes: Internally to the framework they provide storage of traced method invocation information received from the remote execution via BytemanTestHelper->InstrumentedClass->this. To the framework user, they provide utility methods for verifying expectations relating to that remote execution e.g. the number of method calls made.- Author:
- Jonathan Halliday (jonathan.halliday@redhat.com) 2010-05
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertMethodCallCount(String message, String methodName, CallCount callCount)
Checks that the number of known invocations of the given method falls within the specified range.int
getInvocationCount(String methodName)
Returns the number of known invocations of the given method upon the object instance.
-
-
-
Method Detail
-
getInvocationCount
public int getInvocationCount(String methodName)
Returns the number of known invocations of the given method upon the object instance.- Parameters:
methodName
- the method name to look for.- Returns:
- the number of invocations seen.
-
assertMethodCallCount
public void assertMethodCallCount(String message, String methodName, CallCount callCount)
Checks that the number of known invocations of the given method falls within the specified range.- Parameters:
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.
-
-