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

Provide JUnit integration with Tang


    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.10
    • Fix Version/s: None
    • Component/s: Tang


      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.




            • Assignee:
              markus.weimer Markus Weimer
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: