mirror of
https://github.com/JetBrains/intellij-platform-plugin-template.git
synced 2026-03-02 03:39:24 +00:00
MyProjectService.kt: introduce dummy method to visualise code coverage
This commit is contained in:
committed by
Jakub Chrzanowski
parent
d76e7494cc
commit
7de60b2524
@@ -1,10 +1,12 @@
|
||||
package org.jetbrains.plugins.template
|
||||
|
||||
import com.intellij.ide.highlighter.XmlFileType
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.psi.xml.XmlFile
|
||||
import com.intellij.testFramework.TestDataPath
|
||||
import com.intellij.testFramework.fixtures.BasePlatformTestCase
|
||||
import com.intellij.util.PsiErrorElementUtil
|
||||
import org.jetbrains.plugins.template.services.MyProjectService
|
||||
|
||||
@TestDataPath("\$CONTENT_ROOT/src/test/testData")
|
||||
class MyPluginTest : BasePlatformTestCase() {
|
||||
@@ -23,9 +25,15 @@ class MyPluginTest : BasePlatformTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun getTestDataPath() = "src/test/testData/rename"
|
||||
|
||||
fun testRename() {
|
||||
myFixture.testRename("foo.xml", "foo_after.xml", "a2")
|
||||
}
|
||||
|
||||
fun testProjectService() {
|
||||
val projectService = project.service<MyProjectService>()
|
||||
|
||||
assertEquals(4, projectService.getRandomNumber())
|
||||
}
|
||||
|
||||
override fun getTestDataPath() = "src/test/testData/rename"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user