blob: 29da52fc9c8563a73b7de3cc41f7d9861d23217a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*******************************************************************************
* Copyright (c) 2013 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.rpm.ui.editor.tests.hyperlink;
import static org.junit.Assert.assertNotNull;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.linuxtools.internal.rpm.ui.editor.hyperlink.SourcesFileCreateHyperlink;
import org.eclipse.linuxtools.rpm.ui.editor.tests.FileTestCase;
import org.junit.Before;
import org.junit.Test;
public class SourcesFileCreateHyperlinkTest extends FileTestCase {
@Before
public void init() throws CoreException {
super.setUp();
String testText = "Patch0: test\n";
newFile(testText);
}
@Test
public void testCreatePatch() {
SourcesFileCreateHyperlink patchTest = new SourcesFileCreateHyperlink(testFile, specfile.getPatch(0).getFileName(), null);
assertNotNull(patchTest);
patchTest.open();
assertNotNull(testFile.getProject().findMember("test"));
}
}
|