Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

junit 5 console input test

// Instead of using System.in just use a different InputStream!
new ByteArrayInputStream(("your user inpts" + System.lineSeparator() + "enter is simulated by using System.lineSeparator()").getBytes(StandardCharsets.UTF_8)));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #junit #console #input #test
ADD COMMENT
Topic
Name
4+1 =