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 greater 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 ComparatorTesterDSLGreater<O, C extends Comparator<O>> { 036 /** 037 * Specify the values that are greater. 038 * 039 * @param greaterSamples 040 * the samples that are all greater than all the ones specified 041 * before. <b>All the passed samples must be ordered from the 042 * smaller to the bigger</b>. 043 * @return {@link ComparatorTesterDSLEnd the next step of the DSL} 044 */ 045 ComparatorTesterDSLEnd<O, C> withGreaterSamples(O... greaterSamples); 046 047 /** 048 * Specify the values that are greater. 049 * 050 * @param first 051 * the sample that is greater than all the ones specified before 052 * @return {@link ComparatorTesterDSLEnd the next step of the DSL} 053 */ 054 ComparatorTesterDSLEnd<O, C> withGreaterSamples(O first); 055 056 /** 057 * Specify the values that are greater. 058 * 059 * @param first 060 * the sample that is greater than all the ones specified before 061 * @param second 062 * the sample that is greater that the previous 063 * @return {@link ComparatorTesterDSLEnd the next step of the DSL} 064 */ 065 ComparatorTesterDSLEnd<O, C> withGreaterSamples(O first, O second); 066 067 /** 068 * Specify the values that are greater. 069 * 070 * @param first 071 * the sample that is greater than all the ones specified before 072 * @param second 073 * the sample that is greater that the previous 074 * @param third 075 * the sample that is greater that the previous 076 * @return {@link ComparatorTesterDSLEnd the next step of the DSL} 077 */ 078 ComparatorTesterDSLEnd<O, C> withGreaterSamples(O first, O second, O third); 079 080 /** 081 * Specify the values that are greater. 082 * 083 * @param first 084 * the sample that is greater than all the ones specified before 085 * @param second 086 * the sample that is greater that the previous 087 * @param third 088 * the sample that is greater that the previous 089 * @param fourth 090 * the sample that is greater that the previous 091 * @return {@link ComparatorTesterDSLEnd the next step of the DSL} 092 */ 093 ComparatorTesterDSLEnd<O, C> withGreaterSamples(O first, O second, O third, 094 O fourth); 095}