Skip to content

Instantly share code, notes, and snippets.

@LenarBad
Last active May 7, 2018 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LenarBad/1e595b7c3d3651a5fe2a793bfd6159d8 to your computer and use it in GitHub Desktop.
Save LenarBad/1e595b7c3d3651a5fe2a793bfd6159d8 to your computer and use it in GitHub Desktop.
BaseIT class for Spring Booot and TestNG tests
package io.lenar.examples.spring.start;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = TestNGWithSpringApplication.class)
public class BaseIT extends AbstractTestNGSpringContextTests {
// Common methods, variables and constants
}
package io.lenar.examples.spring.start;
import org.testng.Assert;
import org.testng.annotations.Test;
public class TestNGTestsWithSpringBootIT extends BaseIT {
@Test
public void simpleTest() {
Assert.assertEquals(2 * 2, 4, "2x2 should be 4");
}
}
@LenarBad
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment