From 4546ee07c8e556e32552ab3ccac02ca582a794d1 Mon Sep 17 00:00:00 2001 From: Wenpiner Date: Sun, 8 Oct 2023 01:43:26 +0800 Subject: [PATCH] First --- .../wenpiner/flutterassets/MyPluginTest.kt | 39 ------------------- src/test/testData/rename/foo.xml | 3 -- src/test/testData/rename/foo_after.xml | 3 -- 3 files changed, 45 deletions(-) delete mode 100644 src/test/kotlin/com/github/wenpiner/flutterassets/MyPluginTest.kt delete mode 100644 src/test/testData/rename/foo.xml delete mode 100644 src/test/testData/rename/foo_after.xml diff --git a/src/test/kotlin/com/github/wenpiner/flutterassets/MyPluginTest.kt b/src/test/kotlin/com/github/wenpiner/flutterassets/MyPluginTest.kt deleted file mode 100644 index ba4d796..0000000 --- a/src/test/kotlin/com/github/wenpiner/flutterassets/MyPluginTest.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.github.wenpiner.flutterassets - -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 com.github.wenpiner.flutterassets.services.MyProjectService - -@TestDataPath("\$CONTENT_ROOT/src/test/testData") -class MyPluginTest : BasePlatformTestCase() { - - fun testXMLFile() { - val psiFile = myFixture.configureByText(XmlFileType.INSTANCE, "bar") - val xmlFile = assertInstanceOf(psiFile, XmlFile::class.java) - - assertFalse(PsiErrorElementUtil.hasErrors(project, xmlFile.virtualFile)) - - assertNotNull(xmlFile.rootTag) - - xmlFile.rootTag?.let { - assertEquals("foo", it.name) - assertEquals("bar", it.value.text) - } - } - - fun testRename() { - myFixture.testRename("foo.xml", "foo_after.xml", "a2") - } - - fun testProjectService() { - val projectService = project.service() - - assertNotSame(projectService.getRandomNumber(), projectService.getRandomNumber()) - } - - override fun getTestDataPath() = "src/test/testData/rename" -} diff --git a/src/test/testData/rename/foo.xml b/src/test/testData/rename/foo.xml deleted file mode 100644 index b21e9f2..0000000 --- a/src/test/testData/rename/foo.xml +++ /dev/null @@ -1,3 +0,0 @@ - - 1>Foo - diff --git a/src/test/testData/rename/foo_after.xml b/src/test/testData/rename/foo_after.xml deleted file mode 100644 index 980ca96..0000000 --- a/src/test/testData/rename/foo_after.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Foo -