2017-08-12 12 views
1

IntelliJインストールでJUnit 5用のMavenインポートがあり、キャッシュを無効にして再起動しました。IntelliJはJUnit 5のJupiterクラスを自動完成しません

IntelliJは、クラスの完全修飾名のスペルがない限り、org.junit.jupiter.api.パッケージ内のクラスに属するクラスも静的メソッドも自動補完することを拒否します(CTRL-SPACE)。クラスが属するパッケージを書くときでも、そのパッケージのクラスは提案されません。

attempts

IntelliJのバージョンは、2017年2月1日です。 Jupiterのバージョンは5.0.0-RC2、プラットフォームは1.0.0-RC2です。

ここから移動する方法がわかりません。このパッケージは、基本的な完成を拒否している唯一のパッケージです。

<properties> 
    <junit.jupiter.version>5.0.0-RC2</junit.jupiter.version> 
    <junit.platform.version>1.0.0-RC2</junit.platform.version> 
</properties> 

<dependency> 
    <groupId>org.junit.jupiter</groupId> 
    <artifactId>junit-jupiter-api</artifactId> 
    <version>${junit.jupiter.version}</version> 
    <scope>test</scope> 
</dependency> 

<!-- Only required to run tests in an IDE that bundles an older version --> 
<dependency> 
    <groupId>org.junit.platform</groupId> 
    <artifactId>junit-platform-launcher</artifactId> 
    <version>${junit.platform.version}</version> 
    <scope>test</scope> 
</dependency> 
<!-- Only required to run tests in an IDE that bundles an older version --> 
<dependency> 
    <groupId>org.junit.jupiter</groupId> 
    <artifactId>junit-jupiter-engine</artifactId> 
    <version>${junit.jupiter.version}</version> 
</dependency> 

答えて

2

これらのクラスは、それはJUnitの4を判明File | Settings | Editor | General | Auto Import

+0

でリストを除外していないか確認してください、JUnitの5とTestNGのは、すべてのおそらく自動インポートから除外された自分のやって私は自分自身がこれをやって覚えていません... – Hay

0

RC2の代わりにJUnit 5をM4にダウングレードできます。 IntelliJ 2017.2は、JUnit 5 M4をベースにしています。多分、あなたが直面している問題を引き起こしています。

関連する問題