We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d102bbe commit e8a597bCopy full SHA for e8a597b
1 file changed
core-java-modules/core-java-io-2/src/test/java/com/baeldung/scanner/JavaScannerUnitTest.java
@@ -29,14 +29,15 @@ public void whenReadingPartialLines_thenCorrect() {
29
}
30
31
@Test(expected = NoSuchElementException.class)
32
- public void whenReadingLines_thenThrowNoSuchElementException() {
+
33
+ public void givenNoNewLine_whenReadingNextLine_thenThrowNoSuchElementException() {
34
try (Scanner scanner = new Scanner("")) {
35
String result = scanner.nextLine();
36
37
38
39
@Test(expected = IllegalStateException.class)
- public void whenReadingLines_thenThrowIllegalStateException() {
40
+ public void givenScannerIsClosed_whenReadingNextLine_thenThrowIllegalStateException() {
41
Scanner scanner = new Scanner("");
42
scanner.close();
43
0 commit comments