Created
June 1, 2018 18:13
-
-
Save CollectiveHealth-gists/d4561e85fee1f3bc82182a91616b0199 to your computer and use it in GitHub Desktop.
Testing with real instance of SoundSystem, but mocked out DisplaySystem.
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
public class IntegrationWithSoundSystemTest { | |
@Test | |
public void testSoundSystem() { | |
Injector injector = Guice.createInjector(new ComputerTestModule() | |
.withInstance(SoundSystem.class, new SoundSystem())); | |
Computer computer = injector.getInstance(Computer.class); | |
// We will be satisfied with no exception being thrown | |
computer.playTestSound(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment