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 * First step of the DSL - Set the instance under test if necessary.
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 ComparatorTesterDSLStart<O, C extends Comparator<O>> extends
036                ComparatorTesterDSLLess<O, C> {
037        /**
038         * This method may be use to specify the instance to be used for the test of
039         * the comparator.
040         * <p>
041         * When not used, the framework try to create itself an instance of the
042         * comparator.
043         * 
044         * @param instance
045         *            The instance to be used for the test.
046         * @return {@link ComparatorTesterDSLEnd the continuation of the DSL}
047         * @throws NullPointerException
048         *             when instance is null.
049         */
050        ComparatorTesterDSLLess<O, C> usingInstance(C instance);
051}