Package org.junithelper.core.exception

Examples of org.junithelper.core.exception.JUnitHelperCoreException


  private Assertion() {
  }

  public static <T> void mustNotBeNull(T arg, String name) {
    if (arg == null) {
      throw new JUnitHelperCoreException(name + " must not be null.");
    }
  }
View Full Code Here


    }
  }

  public static void mustNotBeEmpty(String arg, String name) {
    if (arg == null || arg.length() == 0) {
      throw new JUnitHelperCoreException(name + " must not be empty.");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeGreaterThan(int arg, int lowerLimit, String name) {
    if (arg <= lowerLimit) {
      throw new JUnitHelperCoreException(name + " must not be greater than " + lowerLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeGreaterThanOrEqual(int arg, int lowerLimit, String name) {
    if (arg < lowerLimit) {
      throw new JUnitHelperCoreException(name + " must not be greater than or equal " + lowerLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeLessThan(int arg, int upperLimit, String name) {
    if (arg >= upperLimit) {
      throw new JUnitHelperCoreException(name + " must not be less than " + upperLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeLessThanOrEqual(int arg, int upperLimit, String name) {
    if (arg > upperLimit) {
      throw new JUnitHelperCoreException(name + " must not be less than or equal " + upperLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeGreaterThan(long arg, long lowerLimit, String name) {
    if (arg <= lowerLimit) {
      throw new JUnitHelperCoreException(name + " must not be greater than " + lowerLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeGreaterThanOrEqual(long arg, long lowerLimit, String name) {
    if (arg < lowerLimit) {
      throw new JUnitHelperCoreException(name + " must not be greater than or equal " + lowerLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeLessThan(long arg, long upperLimit, String name) {
    if (arg >= upperLimit) {
      throw new JUnitHelperCoreException(name + " must not be less than " + upperLimit + ".");
    }
  }
View Full Code Here

    }
  }

  public static void mustBeLessThanOrEqual(long arg, long upperLimit, String name) {
    if (arg > upperLimit) {
      throw new JUnitHelperCoreException(name + " must not be less than or equal " + upperLimit + ".");
    }
  }
View Full Code Here

TOP

Related Classes of org.junithelper.core.exception.JUnitHelperCoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.