Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CollectiveHealth-gists/7098eff1e02ce03bd2c0a0a62abb613a to your computer and use it in GitHub Desktop.
Save CollectiveHealth-gists/7098eff1e02ce03bd2c0a0a62abb613a to your computer and use it in GitHub Desktop.
Testing with real instance of DisplaySystem, but mocked out SoundSystem.
public class IntegrationWithDisplaySystemTest {
@Test
public void testDisplaySystem() {
Injector injector = Guice.createInjector(new ComputerTestModule()
.withInstance(DisplaySystem.class, new DisplaySystem()));
Computer computer = injector.getInstance(Computer.class);
// We are satisfied with no exception being thrown
computer.showDesktop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment