Merge pull request #15801 from eugenp/comment-15080
Update givenInputFromConsole_whenUsingScanner_thenReadCharByChar
This commit is contained in:
commit
a57ecf1bef
|
@ -51,9 +51,10 @@ public class ReadInputCharByCharUnitTest {
|
||||||
System.setIn(inputStream);
|
System.setIn(inputStream);
|
||||||
|
|
||||||
try (Scanner scanner = new Scanner(System.in)) {
|
try (Scanner scanner = new Scanner(System.in)) {
|
||||||
|
if (scanner.hasNext()) {
|
||||||
char[] result = scanner.next().toCharArray();
|
char[] result = scanner.next().toCharArray();
|
||||||
|
|
||||||
assertArrayEquals("TestInput".toCharArray(), result);
|
assertArrayEquals("TestInput".toCharArray(), result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue