JakeWharton / dagger-reflect

A reflection-based implementation of the Dagger dependency injection library for fast IDE builds.
Apache License 2.0
655 stars 44 forks source link

Creates cycle indirection scenarios for tests #200

Open gfreivasc opened 4 years ago

gfreivasc commented 4 years ago

Creates IndirectionCycle with regular provided dependencies,BindsIndirectionCycle for bound dependencies indirection, and MultibindProviderMapIndirectionCycle for the scenario pinpointed in issue #175 and resolved by #198.

TWiStErRob commented 4 years ago

There's a cycle test in upstream as well: https://github.com/JakeWharton/dagger-reflect/blob/dec8f8f75256fe70d2fbd86d671b6723de562337/integration-tests/upstream/build.gradle#L21-L23 But I guess this will never execute because https://github.com/JakeWharton/dagger-reflect/issues/4#issuecomment-646408154

TWiStErRob commented 4 years ago

What do you think about testing cycles and checking that the instances actually end up the same when scoped?

gfreivasc commented 4 years ago

Quickly looking at it, it seems that perhaps some of these tests are okay to run. I'll take a look, since upstream currently covers two of the three tests.

gfreivasc commented 4 years ago

I think the test scenario and tests suffice, right?