com.google.inject.CreationException: Unable to create injector, see the following errors: 1) No implementation for sketchpad.GuiceTest$B was bound. while locating sketchpad.GuiceTest$B

GitHub | bcoughlan | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Binding to mock instance of concrete class fails if real class cannot be injected

    GitHub | 6 months ago | bcoughlan
    com.google.inject.CreationException: Unable to create injector, see the following errors: 1) No implementation for sketchpad.GuiceTest$B was bound. while locating sketchpad.GuiceTest$B

    Root Cause Analysis

    1. com.google.inject.CreationException

      Unable to create injector, see the following errors: 1) No implementation for sketchpad.GuiceTest$B was bound. while locating sketchpad.GuiceTest$B

      at sketchpad.GuiceTest$A.b()
    2. sketchpad
      GuiceTest$ToInstanceInjector.bindMockitoMock
      1. sketchpad.GuiceTest$A.b(GuiceTest.java:13)
      2. sketchpad.GuiceTest$ToInstanceInjector.bindMockitoMock(GuiceTest.java:25)
      2 frames