O - The object of the comparatorC - The comparator undertest@TestInterface(value=ch.powerunit.comparator.impl.ComparatorTesterImpl.class) public final class ComparatorTester<O,C extends Comparator<O>> extends Object
Comparator.| Modifier and Type | Method and Description |
|---|---|
Class<C> |
getComparatorClass()
Used by the framework.
|
Supplier<O[]> |
getEqualSamples()
Used by the framework.
|
Supplier<O[]> |
getGreaterSamples()
Used by the framework.
|
Supplier<O[]> |
getLessSamples()
Used by the framework.
|
Supplier<C> |
getUnderTest()
Used by the framework.
|
static <O,C extends Comparator<O>> |
of(Class<C> clazzUnderTest)
Use this method to start the DSL to test a comparator.
|
public static <O,C extends Comparator<O>> ComparatorTesterDSLStart<O,C> of(Class<C> clazzUnderTest)
For example :
@TestDelegate
public final ComparatorTester<Integer, MyComparator> direct = ComparatorTester.of(
MyComparator.class).withLessSamples(-6).withEqualSamples(12)
.withGreaterSamples(16).build();
O - The object of the comparatorC - The comparator undertestclazzUnderTest - The class of the comparator to be tested.the following of the DSLNullPointerException - when clazzUnderTest is nullTestDelegatepublic Class<C> getComparatorClass()
public Supplier<O[]> getLessSamples()
public Supplier<O[]> getEqualSamples()
public Supplier<O[]> getGreaterSamples()
public Supplier<C> getUnderTest()
Copyright © 2015 Powerunit. All rights reserved.