@Test public void isTrue() { String a = "abc"; String b = new String("abc"); Assert.isTrue(a.equals(b), ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("字符串a equals 字符串b"); Assert.isTrue(a != b, ErrorCodeDef.SYSTEM_ERROR_10001); System.out.println("字符串a != 字符串b"); }
public static void isTrue(final boolean result, final int errorCode, final Object... params) { if (!result) { throw new AssertException(errorCode, params); } }
Assert { public static void isTrue(final boolean result, final int errorCode, final Object... params) { if (!result) { throw new AssertException(errorCode, params); } } }
Assert { public static void isTrue(final boolean result, final int errorCode, final Object... params) { if (!result) { throw new AssertException(errorCode, params); } }  }
Assert { public static void isTrue(final boolean result, final int errorCode, final Object... params) { if (!result) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params); }
Assert { public static void isTrue(final boolean result, final int errorCode, final Object... params) { if (!result) { throw new AssertException(errorCode, params); } }  static void notNull(final Object obj, final int errorCode, final Object... params); static void isNull(final Object obj, final int errorCode, final Object... params); static void notEmpty(final String str, final int errorCode, final Object... params); static void isEmpty(final String str, final int errorCode, final Object... params); static void notEmpty(final T[] str, final int errorCode, final Object... params); static void isEmpty(final T[] str, final int errorCode, final Object... params); static void notEmpty(final Collection<?> str, final int errorCode, final Object... params); static void isEmpty(final Collection<?> str, final int errorCode, final Object... params); static void notEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void isEmpty(final Map<?, ?> str, final int errorCode, final Object... params); static void equals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void notEquals(final Object obj1, final Object obj2, final int errorCode, final Object... params); static void isTrue(final boolean result, final int errorCode, final Object... params); static void isFalse(final boolean result, final int errorCode, final Object... params);  }