Update givenInputFromConsole_whenUsingScanner_thenReadCharByChar
This commit is contained in:
parent
c1fd4cc7dc
commit
7ec4a9fd1d
|
@ -51,9 +51,10 @@ public class ReadInputCharByCharUnitTest {
|
|||
System.setIn(inputStream);
|
||||
|
||||
try (Scanner scanner = new Scanner(System.in)) {
|
||||
char[] result = scanner.next().toCharArray();
|
||||
|
||||
assertArrayEquals("TestInput".toCharArray(), result);
|
||||
while (scanner.hasNext()) {
|
||||
char[] result = scanner.next().toCharArray();
|
||||
assertArrayEquals("TestInput".toCharArray(), result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue