Assembly method in junit

xiaoxiao2021-03-06  124

??? ASSERT: Judging whether a condition is true

??? asserttrue: an alternative method of Assert, to determine if a condition is true

??? assertequals: It is used to determine whether the actual value and the expectation value are the same (Equals), which can be a variety of Java

Object.

??? assertnotnull: Decades whether an object is not empty

??? assertnull: Determine if an object is empty

??? assertsame: Determine if the actual value and the expected value are the same object (==), pay attention to Assertequals

distinguish

??? fail: Direct return failed, throw AssertionFaileDerror

转载请注明原文地址:https://www.9cbs.com/read-126618.html

New Post(0)