org.springframework.boot.test.OutputCapture Java Examples
The following examples show how to use
org.springframework.boot.test.OutputCapture.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DropImportCommandTest.java From mojito with Apache License 2.0 | 5 votes |
public static Long getLastDropIdFromOutput(OutputCapture outputCapture) { Pattern compile = Pattern.compile("Drop id: ([\\d]+)"); Matcher matcher = compile.matcher(outputCapture.toString()); String dropId = null; while (matcher.find()) { dropId = matcher.group(1); } return Long.valueOf(dropId); }