Guice Problem with Tests
- by D3orn
Hey I wrote a LudoGame and now I like to test it with a little GuiceInjection^^
I have an Interface IDie for my die. Now for the game I only need an IDie instead of a realdie = in tests I simply give the LudoGame a MokeDie to set up the Numbers I like to roll.
The IDie has only one method: roll() which returns a int.
BUT the mokeDie now has another public method: sendNextNumber() (should be clear what this does^^)
Now I like to @Inject a Die and if @UseMokeDie is before a Test I'll like to pass the MokeDie
but I'm very new to Guice...
Need some advices please!
Thx for Answers