Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure tests #14

Open
raner opened this issue Oct 1, 2015 · 0 comments
Open

Restructure tests #14

raner opened this issue Oct 1, 2015 · 0 comments

Comments

@raner
Copy link
Owner

raner commented Oct 1, 2015

Having test projects that are specific to a particular logging system and test all DI framework adapters (e.g., loginject-test-log4j) is a problematic approach for a number of reasons. For example, Dagger and Dagger 2 use the same package name, so it is not possible to have both DI frameworks on the classpath at the same time. Also, in the DI-specific tests that are part of each DI adapter, there is a considerable amount of code duplication for setting up the test scenarios.

Ideas:

  • Have a common project as a test dependency that contains all test scenarios (without bindings)
  • Each DI adapter provides bindings for the test scenario
  • Maybe introduce an abstraction to the various instantiation APIs, so that shared tests can be run for each DI adapter, provided that there is a binding and an instantiation adapter implementation
  • The shared test scenario project could depend on all tested logging frameworks
  • Utilize JUnit parameterized testing to support Cartesian product of (all DI adapters) x (all logging frameworks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant