Java Assert assertClassDoesNotExist(String className)

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

Description

assert Class Does Not Exist

License

Open Source License

Declaration

public static void assertClassDoesNotExist(String className) 

Method Source Code

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

public class Main {
    public static void assertClassDoesNotExist(String className) {
        try {/*from   www .  j  a va 2  s  .co  m*/
            Class.forName(className);
            throw new AssertionError("Expected a class to not exists, but it did: " + className);
        } catch (ClassNotFoundException e) {
            // OK
        }
    }
}

Related

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