Removed duplicate method. Added test on swt console view
Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
parent
3b6ba337f1
commit
d2bc86fffc
@ -180,13 +180,6 @@ public class SWTConsoleView extends Composite implements ConsoleDelayIO {
|
|||||||
consoleInput.setText(string);
|
consoleInput.setText(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public void validateCommand() {
|
|
||||||
validateInput();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see fr.bigeon.gclc.swt.ConsoleDelayIO#setInput(java.lang.String) */
|
* @see fr.bigeon.gclc.swt.ConsoleDelayIO#setInput(java.lang.String) */
|
||||||
@Override
|
@Override
|
||||||
|
@ -38,6 +38,8 @@
|
|||||||
*/
|
*/
|
||||||
package fr.bigeon.gclc.swt;
|
package fr.bigeon.gclc.swt;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
@ -65,6 +67,11 @@ public class SWTConsoleViewTest {
|
|||||||
public void test() {
|
public void test() {
|
||||||
final Shell shell = new Shell(DISPLAY);
|
final Shell shell = new Shell(DISPLAY);
|
||||||
final SWTConsoleView swtConsole = new SWTConsoleView(shell, SWT.NONE);
|
final SWTConsoleView swtConsole = new SWTConsoleView(shell, SWT.NONE);
|
||||||
|
try (PipedConsoleManager manager = new PipedConsoleManager()) {
|
||||||
|
swtConsole.setManager(manager);
|
||||||
|
} catch (IOException e2) {
|
||||||
|
assertNull(e2);
|
||||||
|
}
|
||||||
try (PipedConsoleManager manager = new PipedConsoleManager()) {
|
try (PipedConsoleManager manager = new PipedConsoleManager()) {
|
||||||
swtConsole.setManager(manager);
|
swtConsole.setManager(manager);
|
||||||
final ConsoleApplication appl = new ConsoleApplication(manager,
|
final ConsoleApplication appl = new ConsoleApplication(manager,
|
||||||
@ -110,7 +117,7 @@ public class SWTConsoleViewTest {
|
|||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
swtConsole.setText("test"); //$NON-NLS-1$
|
swtConsole.setText("test"); //$NON-NLS-1$
|
||||||
swtConsole.validateCommand();
|
swtConsole.validateInput();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user