JavaLessons/springboot2-junit5-skiptest/src/test/java/com/bvn13/example/springboot/junit/skiptest/SkiptestApplicationTests.java

25 lines
538 B
Java

package com.bvn13.example.springboot.junit.skiptest;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SpringBootTest
@TestEnabledPrefix(prefix = "app.skip.test")
public class SkiptestApplicationTests {
@TestEnabled(property = "first")
@Test
public void testFirst() {
assertTrue(true);
}
@TestEnabled(property = "second")
@Test
public void testSecond() {
assertTrue(false);
}
}