Created
January 14, 2019 12:43
-
-
Save rbaul/cfdca9651fc8ee70509a290c8d37b1bd to your computer and use it in GitHub Desktop.
Application context loads test (Change to H2 DB and set local profile)
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
dependencies { | |
testCompile('com.h2database:h2') | |
} |
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
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.test.context.ActiveProfiles; | |
import org.springframework.test.context.junit4.SpringRunner; | |
@RunWith(SpringRunner.class) | |
@SpringBootTest | |
@AutoConfigureTestDatabase | |
@ActiveProfiles("local_dev") | |
public class MercuryOApplicationTests { | |
@Test | |
public void contextLoads() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment