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

net.jqwik.engine.execution.ReportEntrySupport Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
package net.jqwik.engine.execution;

import java.util.*;

import org.junit.platform.engine.*;
import org.junit.platform.engine.reporting.*;

class ReportEntrySupport {
	public static void printToStdout(TestDescriptor testDescriptor, ReportEntry entry) {
		// System.out.println(testDescriptor.getUniqueId());
		String formattedEntry = formatStandardEntry(entry);
		System.out.println(formattedEntry);
	}

	private static String formatStandardEntry(ReportEntry entry) {
		List stringEntries = new ArrayList<>();
		stringEntries.add(String.format("timestamp = %s", entry.getTimestamp()));
		for (Map.Entry keyValue : entry.getKeyValuePairs().entrySet()) {
			stringEntries.add(String.format("%s = %s", keyValue.getKey(), keyValue.getValue()));
		}
		return String.join(", ", stringEntries) + String.format("%n");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy