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);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void validateCommand() {
|
||||
validateInput();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see fr.bigeon.gclc.swt.ConsoleDelayIO#setInput(java.lang.String) */
|
||||
@Override
|
||||
|
@ -38,6 +38,8 @@
|
||||
*/
|
||||
package fr.bigeon.gclc.swt;
|
||||
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
@ -65,6 +67,11 @@ public class SWTConsoleViewTest {
|
||||
public void test() {
|
||||
final Shell shell = new Shell(DISPLAY);
|
||||
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()) {
|
||||
swtConsole.setManager(manager);
|
||||
final ConsoleApplication appl = new ConsoleApplication(manager,
|
||||
@ -110,7 +117,7 @@ public class SWTConsoleViewTest {
|
||||
@Override
|
||||
public void run() {
|
||||
swtConsole.setText("test"); //$NON-NLS-1$
|
||||
swtConsole.validateCommand();
|
||||
swtConsole.validateInput();
|
||||
}
|
||||
});
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user