All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opengis.cite.ogcapitiles10.EtsAssert Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
package org.opengis.cite.ogcapitiles10;

/**
 * Provides a set of custom assertion methods.
 *
 * @author Lyn Goltz 
 */
public class EtsAssert {

	/**
	 * @param valueToAssert the boolean to assert to be true
	 * @param failureMsg the message to throw in case of a failure, should not be
	 * null
	 */
	public static void assertTrue(boolean valueToAssert, String failureMsg) {
		if (!valueToAssert)
			throw new AssertionError(failureMsg);
	}

	/**
	 * @param valueToAssert the boolean to assert to be false
	 * @param failureMsg the message to throw in case of a failure, should not be
	 * null
	 */
	public static void assertFalse(boolean valueToAssert, String failureMsg) {
		if (valueToAssert)
			throw new AssertionError(failureMsg);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy