Uploaded image for project: 'REEF (Retired)'
  1. REEF (Retired)
  2. REEF-267

Provide JUnit integration with Tang

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.10
    • None
    • Tang

    Description

      We use Tang all over the REEF code base and also strongly encourage our users to use Tang for their own programs. One of the main wins of dependency injection should be testability: Instead of having to instantiate all objects explicitly, we can just rely on Tang instantiating the objects we want to test. Further, it allows us to bind fakes to interfaces we don't need for the test at hand.

      However, we make almost no use of Tang in that capacity and instead call constructors directly all over the place, which makes our code base less than agile. Consider the changes for REEF-246 as an example.

      In order to improve this situation, we should provide better support for unit testing in Tang. For instance, we could make a TestRunner that relies on Tang instead of reflection to instantiate the test classes. That way, our tests could just depend on instances of the classes they are supposed to test, as opposed to instantiating them directly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            markus.weimer Markus Weimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: