| package org.eclipse.wst.sse.sieditor.search.ui.actions; |
| |
| import org.eclipse.jface.viewers.ISelection; |
| import org.eclipse.wst.sse.sieditor.ui.v2.nodes.ITreeNode; |
| import org.junit.Ignore; |
| import org.junit.Test; |
| |
| public class OpenInEditorActionTest { |
| |
| @Test |
| @Ignore |
| public void testGetEditorId() { |
| // OpenInEditorActionMock openInEditorActionMock = new |
| // OpenInEditorActionMock(); |
| // |
| // IDescription descriptionRoot = Mockito.mock(IDescription.class); |
| // // String editorId = |
| // openInEditorActionMock.getEditorId(descriptionRoot); |
| // Assert.assertEquals(ServiceInterfaceEditor.EDITOR_ID, editorId); |
| // |
| // ISchema schemanRoot = Mockito.mock(ISchema.class); |
| // // editorId = openInEditorActionMock.getEditorId(schemanRoot); |
| // Assert.assertEquals(DataTypesEditor.EDITOR_ID, editorId); |
| } |
| |
| private class OpenInEditorActionMock extends OpenInEditorAction { |
| |
| public OpenInEditorActionMock(ISelection selection) { |
| super(selection); |
| } |
| |
| @Override |
| public String getEditorId(ITreeNode treeNode) { |
| return super.getEditorId(treeNode); |
| } |
| } |
| } |