@Test void debugLineTest() { CobolLine debugLine = new CobolLine(); debugLine.setType(DEBUG); debugLine.setIndicatorArea(WS); debugLine.setContentAreaA(" "); debugLine.setContentAreaB(" DEBUG LINE HERE "); CobolLineIndicatorProcessorImpl processor = new CobolLineIndicatorProcessorImpl(); CobolLine outcome = processor.processLine(debugLine); assertEquals( WS + " DEBUG LINE HERE", outcome.getIndicatorArea() + outcome.getContentArea()); }
@Override public CobolLine processLine(final CobolLine line) { final String conditionalRightTrimmedContentArea = conditionalRightTrimContentArea(line); final CobolLine result; switch (line.getType()) { case CONTINUATION: result = processContinuationLine(line, conditionalRightTrimmedContentArea); break; case COMMENT: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( COMMENT_TAG + WS, conditionalRightTrimmedContentArea, line); break; case COMPILER_DIRECTIVE: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea(WS, EMPTY_STRING, line); break; case NORMAL: case DEBUG: default: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( WS, conditionalRightTrimmedContentArea, line); break; } return result; }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public CobolLine processLine(final CobolLine line) { final String conditionalRightTrimmedContentArea = conditionalRightTrimContentArea(line); final CobolLine result; switch (line.getType()) { case CONTINUATION: result = processContinuationLine(line, conditionalRightTrimmedContentArea); break; case COMMENT: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( COMMENT_TAG + WS, conditionalRightTrimmedContentArea, line); break; case COMPILER_DIRECTIVE: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea(WS, EMPTY_STRING, line); break; case NORMAL: case DEBUG: default: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( WS, conditionalRightTrimmedContentArea, line); break; } return result; } }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public CobolLine processLine(final CobolLine line) { final String conditionalRightTrimmedContentArea = conditionalRightTrimContentArea(line); final CobolLine result; switch (line.getType()) { case CONTINUATION: result = processContinuationLine(line, conditionalRightTrimmedContentArea); break; case COMMENT: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( COMMENT_TAG + WS, conditionalRightTrimmedContentArea, line); break; case COMPILER_DIRECTIVE: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea(WS, EMPTY_STRING, line); break; case NORMAL: case DEBUG: default: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( WS, conditionalRightTrimmedContentArea, line); break; } return result; }  }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public CobolLine processLine(final CobolLine line) { final String conditionalRightTrimmedContentArea = conditionalRightTrimContentArea(line); final CobolLine result; switch (line.getType()) { case CONTINUATION: result = processContinuationLine(line, conditionalRightTrimmedContentArea); break; case COMMENT: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( COMMENT_TAG + WS, conditionalRightTrimmedContentArea, line); break; case COMPILER_DIRECTIVE: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea(WS, EMPTY_STRING, line); break; case NORMAL: case DEBUG: default: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( WS, conditionalRightTrimmedContentArea, line); break; } return result; }  @Override List<CobolLine> processLines(final List<CobolLine> lines); @Override CobolLine processLine(final CobolLine line); }
CobolLineIndicatorProcessorImpl implements CobolLineIndicatorProcessor { @Override public CobolLine processLine(final CobolLine line) { final String conditionalRightTrimmedContentArea = conditionalRightTrimContentArea(line); final CobolLine result; switch (line.getType()) { case CONTINUATION: result = processContinuationLine(line, conditionalRightTrimmedContentArea); break; case COMMENT: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( COMMENT_TAG + WS, conditionalRightTrimmedContentArea, line); break; case COMPILER_DIRECTIVE: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea(WS, EMPTY_STRING, line); break; case NORMAL: case DEBUG: default: result = CobolLineUtils.copyCobolLineWithIndicatorAndContentArea( WS, conditionalRightTrimmedContentArea, line); break; } return result; }  @Override List<CobolLine> processLines(final List<CobolLine> lines); @Override CobolLine processLine(final CobolLine line);  }