Java Assert assertFailed(Object expression, Object message)

Here you can find the source of assertFailed(Object expression, Object message)

Description

assert Failed

License

Open Source License

Declaration

public static void assertFailed(Object expression, Object message) 

Method Source Code

//package com.java2s;

public class Main {
    public static void assertFailed(Object expression, Object message) {
        if (message == null || "".equals(message)) {
            throw new AssertionError("Expression: " + expression);
        } else {//from  www  . j  a  v  a  2 s .c  o m
            throw new AssertionError("" + message + ". Expression: "
                    + expression);
        }
    }
}

Related

  1. assertDotted(String name)
  2. assertEntryCount(final long entryCount)
  3. assertEnvVarPresent(String envVarKey, String errorMessage)
  4. assertException(Runnable task, Class clazz)
  5. assertFact(boolean truth, String failure)
  6. assertFails(Class expectedThrowable, String pattern, int... values)
  7. assertFalse(boolean test, String message)
  8. assertFalse(final boolean result, final String message)
  9. assertFalse(String string, boolean b)