Java Assert assertNonZero(int i, String fieldName)

Here you can find the source of assertNonZero(int i, String fieldName)

Description

assert Non Zero

License

Apache License

Declaration

public static void assertNonZero(int i, String fieldName) 

Method Source Code

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

public class Main {
    public static void assertNonZero(int i, String fieldName) {
        if (i == 0) {
            throw new IllegalArgumentException(fieldName + " must be non-zero");
        }//from   ww  w  . ja v a  2 s. c o  m
    }
}

Related

  1. assertMergeTestPostcondition(double[] arr, long[] brr, int arrLen)
  2. assertMessageEquals(Throwable ex, String msg)
  3. assertNonEmpty(String s, String name)
  4. assertNonFatal(boolean test, String msg)
  5. assertNonNegative(int field, String fieldName)
  6. assertNoSlash(final String ofString)
  7. assertNotBlank(final String arg, final String message)
  8. assertNotBlank(final String value, final String exceptionMessage)
  9. assertNotBlank(final String... strings)