Skip to content

Restructure tests #14

Description

@raner

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions