Java Assert assertByThrowing(boolean condition, String errorMessage)

Here you can find the source of assertByThrowing(boolean condition, String errorMessage)

Description

assert By Throwing

License

Open Source License

Declaration

private static void assertByThrowing(boolean condition, String errorMessage) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static void assertByThrowing(boolean condition, String errorMessage) {
        if (!condition) {
            throw new RuntimeException(errorMessage);
        }//from   ww  w .  j av a2s  . c  o m
    }
}

Related

  1. assertArrayIndexScale(final String name, int actualIndexScale, int expectedIndexScale)
  2. assertArrayType(Object array)
  3. assertAssertionsEnabled()
  4. assertAttributeNameIsLegal(final String attributeName)
  5. assertBounds(final long reqOff, final long reqLen, final long allocSize)
  6. assertCharactersNotInString(final String illegalChars, final char... chars)
  7. assertCheckStrAndQuery(String str, String query)
  8. assertClassDoesNotExist(String className)
  9. assertClassExists(String className)