mercredi 1 juin 2016

Ivy: using a common library for unit tests while avoiding circular dependencies

I have a few Ivy projects - let's call them A, B, C and D, that need a common base for unit tests. In order to reuse code I created a separate project Z just to hold this unit test common foundation and added it as a dependency to the various Ivy projects (I'm using JUnit by the way).

The problem is: project Z depends on some classes from the projects A and B. Result: circular dependency. Z depends on A and B for this "unit test foundation", and A and B depend on Z for the unit tests.

I understand circular dependency is undesirable. I get a warning every time I compile the code.

Any suggestions?

Aucun commentaire:

Enregistrer un commentaire