Skip to content

Documentation error: proceed for constructors and modifying arguments #177

@dapperdanman

Description

@dapperdanman

The following URL http://jmockit.org/tutorial/StateBasedTesting.html#proceed it says:

Although not shown here, a call to proceed() can be also be done inside a "$init(Invocation inv, ...)"
mock method, to execute the real implementation of a mocked constructor. Additionally, for
mocked methods/constructors having parameters, we can replace the argument values passed to
the real implementation by passing the replacement values in a proceed(, , ...) call.

When I actually try it, I get:

java.lang.UnsupportedOperationException: Cannot replace arguments when proceeding into constructor

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions