Skip to content
Snippets Groups Projects
Commit fc20d762 authored by Villsty's avatar Villsty
Browse files

changed keyPressed vs KeyPressed

parent 8f8e7cf3
No related branches found
No related tags found
No related merge requests found
......@@ -28,29 +28,29 @@ public class TestSimpleShellStarter {
@Test
public void testWriteFoo() {
shell.KeyPressed('f');
shell.KeyPressed('o');
shell.KeyPressed('o');
shell.keyPressed('f');
shell.keyPressed('o');
shell.keyPressed('o');
assertEquals("$ foo", shell.getScreenContent());
}
@Test
public void testIllegalCommand() {
shell.KeyPressed('f');
shell.KeyPressed('o');
shell.KeyPressed('o');
shell.KeyPressed('\n');
shell.keyPressed('f');
shell.keyPressed('o');
shell.keyPressed('o');
shell.keyPressed('\n');
assertEquals("$ foo\nCommand not found: \"foo\"\n$ ", shell.getScreenContent());
}
@Test
public void testPwd() throws IOException {
shell.KeyPressed('p');
shell.KeyPressed('w');
shell.KeyPressed('d');
shell.KeyPressed('\n');
shell.keyPressed('p');
shell.keyPressed('w');
shell.keyPressed('d');
shell.keyPressed('\n');
String expected = "$ pwd" + "\n" + this.dir.getCanonicalPath() + "\n$ ";
assertEquals(expected, shell.getScreenContent());
......@@ -58,9 +58,9 @@ public class TestSimpleShellStarter {
@Test
public void testLs() throws IOException {
shell.KeyPressed('l');
shell.KeyPressed('s');
shell.KeyPressed('\n');
shell.keyPressed('l');
shell.keyPressed('s');
shell.keyPressed('\n');
String expected = "$ ls\n" + SUBDIR + " \n$ ";
assertEquals(expected, shell.getScreenContent());
......@@ -68,26 +68,26 @@ public class TestSimpleShellStarter {
@Test
public void testCd() throws IOException {
shell.KeyPressed('p');
shell.KeyPressed('w');
shell.KeyPressed('d');
shell.KeyPressed('\n');
shell.KeyPressed('c');
shell.KeyPressed('d');
shell.KeyPressed(' ');
shell.KeyPressed('s');
shell.KeyPressed('u');
shell.KeyPressed('b');
shell.KeyPressed('d');
shell.KeyPressed('i');
shell.KeyPressed('r');
shell.KeyPressed('\n');
shell.KeyPressed('p');
shell.KeyPressed('w');
shell.KeyPressed('d');
shell.KeyPressed('\n');
shell.keyPressed('p');
shell.keyPressed('w');
shell.keyPressed('d');
shell.keyPressed('\n');
shell.keyPressed('c');
shell.keyPressed('d');
shell.keyPressed(' ');
shell.keyPressed('s');
shell.keyPressed('u');
shell.keyPressed('b');
shell.keyPressed('d');
shell.keyPressed('i');
shell.keyPressed('r');
shell.keyPressed('\n');
shell.keyPressed('p');
shell.keyPressed('w');
shell.keyPressed('d');
shell.keyPressed('\n');
String expected = "$ pwd\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment