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

fr.vergne.pester.junit.extension.TestSpecificity Maven / Gradle / Ivy

The newest version!
package fr.vergne.pester.junit.extension;

import java.util.Comparator;

import org.junit.jupiter.api.MethodDescriptor;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.MethodOrdererContext;

import fr.vergne.pester.junit.PesterTestComparator;

public class TestSpecificity implements MethodOrderer {

	private final Comparator descriptorComparator = Comparator.comparing(MethodDescriptor::getMethod,
			new PesterTestComparator());

	@Override
	public void orderMethods(MethodOrdererContext context) {
		context.getMethodDescriptors().sort(descriptorComparator);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy