0
我正在使用Junit在Netbeans的Maven項目中測試一些代碼。指定的依賴項是Junit 4.12(在pom.xml中)。import junit jupiter api not found
但是,我得到一個編譯器錯誤,當我嘗試建立:
error: package org.junit.jupiter.api does not exist
在這條線: import org.junit.jupiter.api.Test;
我懷疑這是一個Junit4/Junit5的事情,因爲當我在IntelliJ中打開該項目的舊版本,它將Junit5列爲依賴項。我應該只使用Junit5嗎?
任何幫助解決構建錯誤,將不勝感激!
謝謝,這是我目前有: ' junit junit 4.12 測試 ' –
不過,我仍然得到同樣的錯誤之前 –
請出示你的'pom.xml'文件? – Aryan