*/
@Test
public void testFullConstructor() {
try {
VersionTooHighException exception = new VersionTooHighException(new NumericVersion(15), new NumericVersion(14));
assertEquals("The specified version is too high.", exception.getMessage());
assertEquals(new NumericVersion(15), exception.getMaximumVersion());
assertEquals(new NumericVersion(14), exception.getSuppliedVersion());
} catch (VersionTooLowException thrown) {
fail("Unexpected exception found: " + thrown.toString());
}
try {
//noinspection ThrowableInstanceNeverThrown
new VersionTooHighException(new NumericVersion(15), new NumericVersion(16));
fail("Expected failure.");
} catch (VersionTooLowException thrown) {
assertEquals(new NumericVersion(16), thrown.getMinimumVersion());
}
}