Java Assert assertClassExists(String className)

Here you can find the source of assertClassExists(String className)

Description

assert Class Exists

License

Open Source License

Declaration

public static void assertClassExists(String className) 

Method Source Code

//package com.java2s;
// This software is released under the Apache License 2.0.

public class Main {
    public static void assertClassExists(String className) {
        try {/*from  w  w  w.j a v  a 2 s  .  c  om*/
            Class.forName(className);
        } catch (ClassNotFoundException e) {
            throw new AssertionError("Expected a class to exists, but it did not: " + className, e);
        }
    }
}

Related

  1. assertBounds(final long reqOff, final long reqLen, final long allocSize)
  2. assertByThrowing(boolean condition, String errorMessage)
  3. assertCharactersNotInString(final String illegalChars, final char... chars)
  4. assertCheckStrAndQuery(String str, String query)
  5. assertClassDoesNotExist(String className)
  6. assertColor(int color)
  7. assertComparison(T actual, T expected)
  8. assertComparison(T actual, T expected)
  9. assertCond(boolean b)