Last active
December 17, 2015 16:19
-
-
Save oehme/5637774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@CreateWith(typeof(GuiceSpecCreator)) | |
@InjectWith(typeof(EnglishModule)) | |
describe Greeter "Interface Injection"{ | |
@Inject | |
Greeter injected | |
fact "the subject is injected by Guice"{ | |
subject.greet should be "Hello" | |
} | |
fact "spec variables are injected by Guice" { | |
injected.greet should be "Hello" | |
} | |
context "within a non-annotated context" { | |
fact "outer bindings are inherited" { | |
subject.greet should be "Hello" | |
} | |
} | |
@InjectWith(typeof(GermanModule)) | |
context "within an annotated context" { | |
fact "the inner annotation takes precedence" { | |
subject.greet should be "Guten Tag" | |
injected.greet should be "Guten Tag" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment