Java Assert assertPositive(int num, String err)

Here you can find the source of assertPositive(int num, String err)

Description

assert Positive

License

Apache License

Declaration

public static void assertPositive(int num, String err) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void assertPositive(int num, String err) {
        if (num <= 0) {
            throw new RuntimeException(err);
        }/*from w ww.  jav  a2  s . c  om*/

    }
}

Related

  1. assertParameter(Class expectedClass, Object[] params, int index)
  2. assertParameterInRange(long param, long lower, long upper)
  3. assertParameterWithinBounds(String name, long lower, long upper, long parameter)
  4. assertParameterWithinBounds(String name, long lower, long upper, long parameter)
  5. assertPasswordMeetsRequirements(String password, boolean expected)
  6. assertPositive(int val, String msg)
  7. assertPositive(int value)
  8. assertPrecondition(boolean b)
  9. assertQualifiedString(String str, String argName)