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

removed a thing, thanks Torstein

parent ee555121
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,7 @@ public class SimpleShell implements CommandLineInterface {
*/
@Override
public String screenLooks() {
public String getScreenContent() {
String s = "";
for (String line : this.history) {
s += line;
......@@ -169,9 +169,5 @@ public class SimpleShell implements CommandLineInterface {
return s;
}
@Override
public void keyPressed(char key) {
}
}
......@@ -23,7 +23,7 @@ public class TestSimpleShellStarter {
@Test
public void testDoNothing() {
assertEquals("$ ", shell.screenLooks());
assertEquals("$ ", shell.getScreenContent());
}
@Test
......@@ -32,7 +32,7 @@ public class TestSimpleShellStarter {
shell.KeyPressed('o');
shell.KeyPressed('o');
assertEquals("$ foo", shell.screenLooks());
assertEquals("$ foo", shell.getScreenContent());
}
@Test
......@@ -42,7 +42,7 @@ public class TestSimpleShellStarter {
shell.KeyPressed('o');
shell.KeyPressed('\n');
assertEquals("$ foo\nCommand not found: \"foo\"\n$ ", shell.screenLooks());
assertEquals("$ foo\nCommand not found: \"foo\"\n$ ", shell.getScreenContent());
}
@Test
......@@ -53,7 +53,7 @@ public class TestSimpleShellStarter {
shell.KeyPressed('\n');
String expected = "$ pwd" + "\n" + this.dir.getCanonicalPath() + "\n$ ";
assertEquals(expected, shell.screenLooks());
assertEquals(expected, shell.getScreenContent());
}
@Test
......@@ -63,7 +63,7 @@ public class TestSimpleShellStarter {
shell.KeyPressed('\n');
String expected = "$ ls\n" + SUBDIR + " \n$ ";
assertEquals(expected, shell.screenLooks());
assertEquals(expected, shell.getScreenContent());
}
@Test
......@@ -97,7 +97,7 @@ public class TestSimpleShellStarter {
+ this.subdir.getCanonicalPath() + "\n"
+ "$ ";
assertEquals(expected, shell.screenLooks());
assertEquals(expected, shell.getScreenContent());
}
......
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