6768697071727374
} } public static void mustBeGreaterThan(double arg, double lowerLimit, String name) { if (arg <= lowerLimit) { throw new JUnitHelperCoreException(name + " must not be greater than " + lowerLimit + "."); } }
7374757677787980
} } public static void mustBeGreaterThanOrEqual(double arg, double lowerLimit, String name) { if (arg < lowerLimit) { throw new JUnitHelperCoreException(name + " must not be greater than or equal " + lowerLimit + "."); } }
7980818283848586
} } public static void mustBeLessThan(double arg, double upperLimit, String name) { if (arg >= upperLimit) { throw new JUnitHelperCoreException(name + " must not be less than " + upperLimit + "."); } }
8586878889909192
} } public static void mustBeLessThanOrEqual(double arg, double upperLimit, String name) { if (arg > upperLimit) { throw new JUnitHelperCoreException(name + " must not be less than or equal " + upperLimit + "."); } }
67891011121314
private String name; private Assertion(String name) { if (name == null || name.length() == 0) { throw new JUnitHelperCoreException("assertion target name must not be empty."); } this.name = name; }
1718192021222324
return new Assertion(name); } public <T> void mustNotBeNull(T arg) { if (arg == null) { throw new JUnitHelperCoreException(name + " must not be null."); } }
2324252627282930
} } public void mustNotBeEmpty(String arg) { if (arg == null || arg.length() == 0) { throw new JUnitHelperCoreException(name + " must not be empty."); } }
2930313233343536
} } public void mustBeGreaterThan(int arg, int lowerLimit) { if (arg <= lowerLimit) { throw new JUnitHelperCoreException(name + " must not be greater than " + lowerLimit + "."); } }
3536373839404142
} } public void mustBeGreaterThanOrEqual(int arg, int lowerLimit) { if (arg < lowerLimit) { throw new JUnitHelperCoreException(name + " must not be greater than or equal " + lowerLimit + "."); } }
4142434445464748
} } public void mustBeLessThan(int arg, int upperLimit) { if (arg >= upperLimit) { throw new JUnitHelperCoreException(name + " must not be less than " + upperLimit + "."); } }