From 186eddad1e16abea6431133d373c577f6453d037 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Wed, 11 Feb 2015 14:53:39 +0300 Subject: [PATCH] test fixed to new properties insertion logic --- .../intellij/lang/properties/PropertiesFileTest.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesFileTest.java b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesFileTest.java index 159dd58d140d..b0d0c5e162f2 100644 --- a/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesFileTest.java +++ b/plugins/properties/testSrc/com/intellij/lang/properties/PropertiesFileTest.java @@ -22,6 +22,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.WriteCommandAction; import com.intellij.testFramework.LightPlatformTestCase; import com.intellij.testFramework.PlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; @@ -30,16 +31,13 @@ import java.util.List; /** * @author max */ -public class PropertiesFileTest extends LightPlatformTestCase { +public class PropertiesFileTest extends LightPlatformCodeInsightFixtureTestCase { private Property myPropertyToAdd; - public PropertiesFileTest() { - PlatformTestCase.initPlatformLangPrefix(); - } - @Override protected void setUp() throws Exception { super.setUp(); + PlatformTestCase.initPlatformLangPrefix(); myPropertyToAdd = (Property)PropertiesElementFactory.createProperty(getProject(), "kkk", "vvv"); } @@ -73,8 +71,8 @@ public class PropertiesFileTest extends LightPlatformTestCase { List properties = propertiesFile.getProperties(); assertEquals(2, properties.size()); - assertPropertyEquals(properties.get(0), "xxx", "yyy"); - assertPropertyEquals(properties.get(1), myPropertyToAdd.getName(), myPropertyToAdd.getValue()); + assertPropertyEquals(properties.get(1), "xxx", "yyy"); + assertPropertyEquals(properties.get(0), myPropertyToAdd.getName(), myPropertyToAdd.getValue()); } public void testDeleteProperty() throws Exception { PropertiesFile propertiesFile = PropertiesElementFactory.createPropertiesFile(getProject(), "xxx=yyy\n#s\nzzz=ttt\n\n");