assert vs. JUnit Assertions

前端 未结 6 983
难免孤独
难免孤独 2020-11-29 03:32

Today I saw a JUnit test case with a java assertion instead of the JUnit assertions—Are there significant advantages or disadvantages to prefer one over the other?

6条回答
  •  爱一瞬间的悲伤
    2020-11-29 03:50

    I would say if you are using JUnit you should use the JUnit assertions. assertTrue() is basically the same as assert, Otherwise why even use JUnit?

提交回复
热议问题