Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

oehme/jnario-guice

Repository files navigation

jnario-guice

Guice dependency injection for Jnario Specs

Build Status Download

Features

Just annotate your Spec class with

@CreateWith(GuiceSpecCreator) 

and optionally specify a Guice module using

@InjectWith(MyModule)

Now you can use the @Inject annotation in your spec.

@CreateWith(GuiceSpecCreator)
@InjectWith(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"
	}
}

About

Guice dependency injection for Jnario tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published