Created
April 23, 2020 16:22
-
-
Save yogonza524/d5c6ed82596ae6e3e4548f209db35a30 to your computer and use it in GitHub Desktop.
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
package testcontainer.sample; | |
import org.junit.jupiter.api.Test; | |
import org.testcontainers.containers.GenericContainer; | |
import org.testcontainers.junit.jupiter.Container; | |
import org.testcontainers.junit.jupiter.Testcontainers; | |
import static org.junit.jupiter.api.Assertions.*; | |
@Testcontainers | |
class LibraryTest { | |
@Container | |
private GenericContainer helloWorld = new GenericContainer<>("hello-world"); | |
@Test void testSomeLibraryMethod() { | |
assertTrue(helloWorld.getLogs().contains("Hello from Docker!")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment