All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.jqwik.engine.execution.reporting.BuilderBasedLineReporter Maven / Gradle / Ivy

The newest version!
package net.jqwik.engine.execution.reporting;

class BuilderBasedLineReporter implements LineReporter {

	private final StringBuilder builder;
	private final int baseIndent;

	BuilderBasedLineReporter(StringBuilder builder, int baseIndent) {
		this.builder = builder;
		this.baseIndent = baseIndent;
	}

	@Override
	public void addLine(int indentLevel, String line) {
		int effectiveIndent = indentLevel + baseIndent;
		String indentation = LineReporter.multiply(' ', effectiveIndent * 2);
		builder.append(String.format("%s%s%n", indentation, line));
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy