2017-06-21 43 views
0

在Kotlin類上選擇「創建測試」時,我想默認包含其他導入。例如,目前只包含import org.testng.annotations.Test,但我也想要import org.testng.Assert.*修改測試文件模板

如何在IntelliJ中修改Kotlin/TestNG的測試文件模板?

回答

2

如果仔細觀察,生成的Kotlin測試類實際上是首先生成爲Java類,然後很快轉換爲Kotlin。

因此,你可以修改SettingsTestNG Test Class模板 - >Editor - >File and Code templates - >Code

+0

Ooooh我明白了。將嘗試,謝謝。 – assylias