public class SuggestedAssertsReport extends Object
| Constructor and Description |
|---|
SuggestedAssertsReport() |
| Modifier and Type | Method and Description |
|---|---|
String |
createReport(Object testObject,
List<ObservedInvocation> observedInvocations)
Creates a string representation of the given invocations.
|
protected String |
formatMockName(ObservedInvocation observedInvocation) |
protected String |
getFieldName(Object testObject,
Object value)
Checks whether the given argument value is a value of a field in the test object and, if so, returns the
name of that field.
|
protected String |
getSuggestedArgument(Object argument)
Creates an appropriate value so that the assert statement will be able to match the given argument value
that was observed in the scenario.
|
protected String |
getSuggestedAssertStatement(Object testObject,
ObservedInvocation observedInvocation)
Creates an assert statement for the given method invocation and arguments.
|
public String createReport(Object testObject, List<ObservedInvocation> observedInvocations)
testObject - The test instance, not nullobservedInvocations - The invocations, not nullprotected String getSuggestedAssertStatement(Object testObject, ObservedInvocation observedInvocation)
testObject - The test instance, null if there is no test objectobservedInvocation - The invocation, not nullprotected String getSuggestedArgument(Object argument)
argument - The actual argument value, not nullprotected String getFieldName(Object testObject, Object value)
testObject - The test instance, null if there is no test objectvalue - The value to look for, not nullprotected String formatMockName(ObservedInvocation observedInvocation)
Copyright © 2016. All Rights Reserved.