Java Assert True assertTrue(final boolean result, final String faultDescription)

Here you can find the source of assertTrue(final boolean result, final String faultDescription)

Description

assert True

License

Apache License

Declaration

public static void assertTrue(final boolean result, final String faultDescription) 

Method Source Code

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

public class Main {
    public static void assertTrue(final boolean result, final String faultDescription) {
        if (!result) {
            throw new IllegalArgumentException(String.format(
                    "[Assertion failed error. Expected true value for %s, but got false]", faultDescription));
        }/*from ww  w. jav a  2 s  . c  om*/
    }
}

Related

  1. assertTrue(boolean express)
  2. assertTrue(boolean expression)
  3. assertTrue(boolean expValue, String errMsg)
  4. assertTrue(boolean value)
  5. assertTrue(final boolean condition, final String message)
  6. assertTrue(final String message, final boolean condition)
  7. assertTrue(String message, boolean condition)
  8. assertTrue(String message, boolean condition)
  9. assertTrue(String message, boolean condition)