Skip to content

Mocked class + Cascading class with similar name in same package = NoSuchMethodException #57

@jamesflagg

Description

@jamesflagg

Use case:

  1. There is a class which is annotated as Mocked for a unit test.
  2. This class has a method which is recorded in an Expectations block.
  3. The recorded method returns an Object type (not void or primitive or String).
  4. We have a second class which happens to be in the same package as the first class, and whose name happens to start with the name of the first class.
  5. The second class is annotated as a Cascading mock for the test.

Result : When recording the expectations block, a NoSuchMethodException is thrown and causes a test failure.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions