@Deprecated public final class BizAssert extends Object
BizException,
ArgumentAssert| 限定符和类型 | 方法和说明 |
|---|---|
static void |
equals(Object expected,
Object actual,
String exceptionMsg)
已过时。
|
static void |
equals(String expected,
String actual,
BaseExceptionCode exceptionCode)
已过时。
断言2个字符串是否相等,如果不等用指定错误码抛出异常
BizException |
static void |
equals(String expected,
String actual,
String exceptionMsg)
已过时。
|
static void |
fail()
已过时。
Fails a test with no message.
|
static void |
fail(BaseExceptionCode exceptionCode)
已过时。
|
static void |
fail(int code,
String message)
已过时。
Fails a test with the given message.
|
static void |
fail(String msg)
已过时。
|
static void |
gt(LocalDateTime expected,
LocalDateTime actual,
String exceptionMsg)
已过时。
断言 预期值(expected) 大于 实际值(actual)
|
static void |
isFalse(boolean condition,
BaseExceptionCode exceptionCode)
已过时。
断言条件为假。
|
static void |
isFalse(boolean condition,
String exceptionMessage,
String... args)
已过时。
|
static void |
isNull(Object object,
BaseExceptionCode exceptionCode)
已过时。
断言检查这个对象是 Null。
|
static void |
isTrue(boolean condition)
已过时。
断言条件为真。
|
static void |
isTrue(boolean condition,
BaseExceptionCode exceptionCode)
已过时。
断言条件为真。
|
static void |
isTrue(boolean condition,
String exceptionMessage)
已过时。
断言条件为真。
|
static void |
notEmpty(Collection<?> collection,
BaseExceptionCode exceptionCode)
已过时。
断言集合不为空,如果为null或者empty,用指定错误码抛出异常
BizException |
static void |
notEmpty(Collection<?> collection,
String exceptionMsg)
已过时。
断言集合不为空,如果为null或者empty,用指定错误码抛出异常
BizException |
static void |
notEmpty(String value)
已过时。
|
static void |
notEmpty(String value,
BaseExceptionCode exceptionCode)
已过时。
断言字符串不为空,如果为null或者empty,用指定错误码抛出异常
BizException |
static void |
notEmpty(String value,
String exceptionMsg)
已过时。
|
static <T> void |
notEmpty(T[] array,
BaseExceptionCode exceptionCode)
已过时。
|
static void |
notEquals(Object unexpected,
Object actual,
BaseExceptionCode exceptionCode)
已过时。
断言2个对象不是相等的。
|
static void |
notNull(Object object)
已过时。
|
static void |
notNull(Object object,
BaseExceptionCode exceptionCode)
已过时。
断言检查这个对象不是 Null。
|
static void |
notNull(Object object,
String message)
已过时。
|
public static void fail(int code,
String message)
message - the identifying message for the BizException (null
okay)BizExceptionpublic static void fail(BaseExceptionCode exceptionCode)
public static void fail()
public static void fail(String msg)
public static void isTrue(boolean condition,
BaseExceptionCode exceptionCode)
BizExceptionexceptionCode - 错误码condition - 被检查的条件public static void isTrue(boolean condition,
String exceptionMessage)
BizExceptioncondition - 被检查的条件public static void isTrue(boolean condition)
BizExceptioncondition - 被检查的条件public static void isFalse(boolean condition,
BaseExceptionCode exceptionCode)
BizExceptionexceptionCode - 错误码condition - 被检查的条件public static void notNull(Object object, BaseExceptionCode exceptionCode)
exceptionCode抛出异常
BizExceptionexceptionCode - 错误码object - 检查对象public static void notNull(Object object)
public static void isNull(Object object, BaseExceptionCode exceptionCode)
exceptionCode抛出异常
BizExceptionexceptionCode - 错误码object - 检查对象public static void notEmpty(Collection<?> collection, BaseExceptionCode exceptionCode)
BizExceptionexceptionCode - 错误码collection - 集合public static void notEmpty(Collection<?> collection, String exceptionMsg)
BizExceptionexceptionMsg - 错误码collection - 集合public static <T> void notEmpty(T[] array,
BaseExceptionCode exceptionCode)
public static void notEmpty(String value, BaseExceptionCode exceptionCode)
BizExceptionexceptionCode - 错误码value - 字符串public static void notEmpty(String value)
public static void notEquals(Object unexpected, Object actual, BaseExceptionCode exceptionCode)
exceptionCode - 错误码unexpected - 意想不到的值actual - 要检查的值 unexpectedpublic static void equals(String expected, String actual, BaseExceptionCode exceptionCode)
BizExceptionexceptionCode - 错误码expected - 预期的值actual - 需要比较的字符串expectedpublic static void gt(LocalDateTime expected, LocalDateTime actual, String exceptionMsg)
expected - 预期值actual - 实际值exceptionMsg - 异常消息Copyright © 2023. All rights reserved.