001/** 002 * Powerunit - A JDK1.8 test framework 003 * Copyright (C) 2014 Mathieu Boretti. 004 * 005 * This file is part of Powerunit 006 * 007 * Powerunit is free software: you can redistribute it and/or modify 008 * it under the terms of the GNU General Public License as published by 009 * the Free Software Foundation, either version 3 of the License, or 010 * (at your option) any later version. 011 * 012 * Powerunit is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 015 * GNU General Public License for more details. 016 * 017 * You should have received a copy of the GNU General Public License 018 * along with Powerunit. If not, see <http://www.gnu.org/licenses/>. 019 */ 020package ch.powerunit.comparator.lang; 021 022import java.util.Comparator; 023 024/** 025 * Specify the value that are equals than another one. 026 * 027 * @author borettim 028 * @since 0.3.0 029 * 030 * @param <O> 031 * The object of the comparator 032 * @param <C> 033 * The comparator undertest 034 */ 035public interface ComparatorTesterDSLEquals<O, C extends Comparator<O>> { 036 /** 037 * Specify the values that are equals. 038 * 039 * @param equalSamples 040 * all values that are equals between them. All values must be 041 * greater than the one specified before. 042 * 043 * @return {@link ComparatorTesterDSLGreater the next step of the DSL} 044 */ 045 ComparatorTesterDSLGreater<O, C> withEqualSamples(O... equalSamples); 046 047 /** 048 * Specify the values that are equals. 049 * 050 * @param first 051 * a single value that will be checked against itself. All values 052 * must be greater than the one specified before. 053 * 054 * @return {@link ComparatorTesterDSLGreater the next step of the DSL} 055 */ 056 ComparatorTesterDSLGreater<O, C> withEqualSamples(O first); 057 058 /** 059 * Specify the values that are equals. 060 * 061 * @param first 062 * a first equals value. All values must be greater than the one 063 * specified before. 064 * 065 * @param second 066 * a second equals value. All values must be greater than the one 067 * specified before. 068 * 069 * @return {@link ComparatorTesterDSLGreater the next step of the DSL} 070 */ 071 ComparatorTesterDSLGreater<O, C> withEqualSamples(O first, O second); 072 073 /** 074 * Specify the values that are equals. 075 * 076 * @param first 077 * a first equals value. All values must be greater than the one 078 * specified before. 079 * 080 * @param second 081 * a second equals value. All values must be greater than the one 082 * specified before. 083 * 084 * @param third 085 * a third equals value. All values must be greater than the one 086 * specified before. 087 * 088 * @return {@link ComparatorTesterDSLGreater the next step of the DSL} 089 */ 090 ComparatorTesterDSLGreater<O, C> withEqualSamples(O first, O second, O third); 091 092 /** 093 * Specify the values that are equals. 094 * 095 * @param first 096 * a first equals value. All values must be greater than the one 097 * specified before. 098 * @param second 099 * a second equals value. All values must be greater than the one 100 * specified before. 101 * @param third 102 * a third equals value. All values must be greater than the one 103 * specified before. 104 * @param fourth 105 * a fourth equals value. All values must be greater than the one 106 * specified before. 107 * @return {@link ComparatorTesterDSLGreater the next step of the DSL} 108 */ 109 ComparatorTesterDSLGreater<O, C> withEqualSamples(O first, O second, 110 O third, O fourth); 111}