項目要求,考慮使用junit5的假言/判定(Assumptions)來實現不同情況進行不同的測試.
參考下面文章:
https://howtodoinjava.com/junit5/junit-5-assumptions-examples/
https://cloud.tencent.com/developer/article/1383483
https://www.eclipse.org/eclipse/news/4.7.1a/#junit-5-support
發現自己做的測試類總是拋異常.不會進行skip顯示.
對比發現,原來是@Test註解的import不正確.
舊:import org.junit.Test;
新:import org.junit.jupiter.api.Test;