I am trying to use Guice for TestNG based test environment. This structure analyzes the test class for dependencies and ensures their elimination of the need to create them in tests.
Guice is all about injections, and I think it works well for the framework. But the question is, how to determine the bindings after I created the injector? This is necessary because tests can override bindings to replace default implementations with mocks.
Also, I want to guess the runtime implementation in some cases based on class naming conventions. Sounds like a one-in-one binding function. But how can I provide my own time reference provider?
source
share