guice-junit-test-runner

A simple Guice JUnit test runner.

License

License

Categories

Categories

JUnit Unit Testing GUI User Interface SBE Data Data Structures Guice Application Layer Libs Dependency Injection
GroupId

GroupId

com.carlosbecker
ArtifactId

ArtifactId

guice-junit-test-runner
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

guice-junit-test-runner
A simple Guice JUnit test runner.
Source Code Management

Source Code Management

http://github.com/caarlos0/guice-junit-test-runner

Download guice-junit-test-runner

How to add to project

<!-- https://jarcasting.com/artifacts/com.carlosbecker/guice-junit-test-runner/ -->
<dependency>
    <groupId>com.carlosbecker</groupId>
    <artifactId>guice-junit-test-runner</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.carlosbecker/guice-junit-test-runner/
implementation 'com.carlosbecker:guice-junit-test-runner:1.1'
// https://jarcasting.com/artifacts/com.carlosbecker/guice-junit-test-runner/
implementation ("com.carlosbecker:guice-junit-test-runner:1.1")
'com.carlosbecker:guice-junit-test-runner:jar:1.1'
<dependency org="com.carlosbecker" name="guice-junit-test-runner" rev="1.1">
  <artifact name="guice-junit-test-runner" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.carlosbecker', module='guice-junit-test-runner', version='1.1')
)
libraryDependencies += "com.carlosbecker" % "guice-junit-test-runner" % "1.1"
[com.carlosbecker/guice-junit-test-runner "1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
junit : junit jar 4.11
com.google.inject : guice jar 3.0
javax.inject : javax.inject jar 1

test (1)

Group / Artifact Type Version
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

guice-junit-test-runner Build Status Coverage Status Stories in Ready Maven Central

A very simple artifact, with no dependencies besides JUnit and Guice, which is intended to make it easier to test your Guice code.

Usage

Add the dependency to your pom.xml:

<dependency>
	<groupId>com.carlosbecker</groupId>
	<artifactId>guice-junit-test-runner</artifactId>
	<version>1.1</version>
	<scope>test</scope>
</dependency>

Write your tests:

@RunWith(GuiceTestRunner.class)
@GuiceModules(MyModule.class)
public class MyTest {
	@Inject
	private Something something;

	@Test
	public void testItWorks() throws Exception {
		Assert.assertThat(something.doSomething(), CoreMatchers.notNullValue());
	}
}

And that's it!

How to contribute

Fork repository, make changes, send a pull request. I will review your changes and apply them to the master branch shortly. To avoid frustration, previously build your branch with:

mvn clean install -Pqulice

Got questions?

If you have questions or general suggestions, don't hesitate to submit a new Github issue.

Versions

Version
1.1
1.0