Skip to content

Commit e83f0de

Browse files
author
Sommer
committed
[TESTS] backward compatibility of tests
1 parent d133d22 commit e83f0de

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/test/java/net/seesharpsoft/intellij/plugins/csv/editor/CsvFileEditorTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package net.seesharpsoft.intellij.plugins.csv.editor;
22

3-
import com.intellij.ide.impl.convert.JDomConvertingUtil;
43
import com.intellij.openapi.editor.EditorSettings;
54
import com.intellij.openapi.fileEditor.*;
65
import com.intellij.openapi.fileEditor.ex.FileEditorProviderManager;
76
import com.intellij.openapi.fileEditor.impl.text.TextEditorState;
8-
import com.intellij.openapi.util.JDOMUtil;
97
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
10-
import org.jetbrains.jps.model.serialization.JDomSerializationUtil;
8+
import org.jdom.Element;
119

1210
public class CsvFileEditorTest extends LightCodeInsightFixtureTestCase {
1311

@@ -77,11 +75,12 @@ public void testCsvEditorStateReadsAndWritesStates() {
7775

7876
FileEditorProvider[] fileEditorProviders = FileEditorProviderManager.getInstance().getProviders(myFixture.getProject(), myFixture.getFile().getVirtualFile());
7977
CsvFileEditorProvider fileEditorProvider = (CsvFileEditorProvider)fileEditorProviders[0];
80-
81-
FileEditorState state = fileEditorProvider.readState(JDomConvertingUtil.createComponentElement(JDomSerializationUtil.COMPONENT_ELEMENT), this.getProject(), this.getFile().getVirtualFile());
78+
Element dummy = new Element("dummy");
79+
80+
FileEditorState state = fileEditorProvider.readState(dummy, this.getProject(), this.getFile().getVirtualFile());
8281
assertInstanceOf(state, TextEditorState.class);
8382
textEditor.setState(state);
84-
fileEditorProvider.writeState(state, this.getProject(), JDomConvertingUtil.createComponentElement(JDomSerializationUtil.COMPONENT_ELEMENT));
83+
fileEditorProvider.writeState(state, this.getProject(), dummy);
8584

8685
disposeTextEditor(textEditor);
8786
}

0 commit comments

Comments
 (0)