BAEL-6585 - Unit Testing of System.in with JUnit (#14436)

* BAEL-6585 - Unit Testing of System.in with JUnit

* Rename test classes

* Remane test classes
This commit is contained in:
Ana Peterlić
2023-07-23 05:49:16 +02:00
committed by GitHub
parent 6443fc6509
commit 9b74111078
4 changed files with 98 additions and 0 deletions
@@ -0,0 +1,17 @@
package com.baeldung.systemin;
import java.util.Scanner;
public class Application {
public static final String NAME = "Name: ";
private Application() {
}
public static String readName() {
Scanner scanner = new Scanner(System.in);
String input = scanner.next();
return NAME.concat(input);
}
}