Last active
July 11, 2018 13:44
-
-
Save benauthor/962ca3118070b1c7b3fe1b086da356fc to your computer and use it in GitHub Desktop.
Minimal spring-configured test setup
This file contains hidden or 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
@RunWith(SpringJUnit4ClassRunner.class) | |
@ContextConfiguration(classes = MyConfigurationClass.class) | |
public class MyTest { | |
@Autowired | |
private MyWhateverType myConfiguredBean; | |
@Test | |
public void testMyConfiguredBean() { | |
System.out.println("works"); | |
System.out.println(myConfiguredBean); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment