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

com.github.httpmock.api.times.Exactly Maven / Gradle / Ivy

package com.github.httpmock.api.times;

public class Exactly implements Times {

	private int numberOfTimes;

	public Exactly(int numberOfTimes) {
		this.numberOfTimes = numberOfTimes;
	}

	@Override
	public boolean matches(int num) {
		return num == numberOfTimes;
	}

	@Override
	public String getFailedDescription() {
		return String.format("exactly %d times", numberOfTimes);
	}

	public static Exactly times(int numberOfTimes) {
		return new Exactly(numberOfTimes);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy