Here you can find the source of assertTrue(final boolean condition, final String message)
Parameter | Description |
---|---|
condition | the condition to assert is true. |
message | the message to display if the condition is not true. |
public static void assertTrue(final boolean condition, final String message)
//package com.java2s; /*/*from w ww. j a va2 s .c o m*/ * oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ public class Main { /** * Assert that the statement is true, otherwise throw an exception with the provided message. * * @param condition the condition to assert is true. * @param message the message to display if the condition is not true. */ public static void assertTrue(final boolean condition, final String message) { if (!condition) { throw new IllegalArgumentException(message); } } }