application test : junit5 - 외부 설정
This commit is contained in:
@@ -17,26 +17,49 @@ import java.time.Duration;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
|
||||
//@DisplayNameGeneration(DisplayNameGenerator.ReplaceUnderscores.class)
|
||||
//@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
class StudyTest {
|
||||
|
||||
@Order(2)
|
||||
@Test
|
||||
@DisplayName("order test2")
|
||||
void test_29() {
|
||||
System.out.println(this);
|
||||
System.out.println("테스트 2");
|
||||
void test_32() {
|
||||
System.out.println("test");
|
||||
}
|
||||
|
||||
@Order(1)
|
||||
@Test
|
||||
@DisplayName("order test1")
|
||||
void test_28() {
|
||||
System.out.println(this);
|
||||
System.out.println("테스트 1");
|
||||
}
|
||||
|
||||
// int value = 0;
|
||||
//
|
||||
// @Test
|
||||
// @DisplayName("instance test2")
|
||||
// void test_31() {
|
||||
// System.out.println(this);
|
||||
// System.out.println("value: " + value++);
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// @DisplayName("instance test1")
|
||||
// @Disabled
|
||||
// void test_30() {
|
||||
// System.out.println(this);
|
||||
// System.out.println("value: " + value++);
|
||||
// }
|
||||
|
||||
// @Order(2)
|
||||
// @Test
|
||||
// @DisplayName("order test2")
|
||||
// void test_29() {
|
||||
// System.out.println(this);
|
||||
// System.out.println("테스트 2");
|
||||
// }
|
||||
//
|
||||
// @Order(1)
|
||||
// @Test
|
||||
// @DisplayName("order test1")
|
||||
// void test_28() {
|
||||
// System.out.println(this);
|
||||
// System.out.println("테스트 1");
|
||||
// }
|
||||
|
||||
// int value = 0;
|
||||
//
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
# 테스트 이름 표기 전략 설정
|
||||
junit.jupiter.displayname.generator.default = \
|
||||
org.junit.jupiter.api.DisplayNameGenerator$ReplaceUnderscores
|
||||
|
||||
# 테스트 인스턴스 라이프사이클 설정
|
||||
#junit.jupiter.testinstance.lifecycle.default = per_class
|
||||
|
||||
# @Disabled 무시하고 실행하기
|
||||
#junit.jupiter.conditions.deactivate = org.junit.*DisabledCondition
|
||||
|
||||
Reference in New Issue
Block a user