سؤال

I use

assertEquals(String, String)

in a JUnit test. Netbeans (or is it Maven?) suggest that I add an import of one of:

org.junit.assert.assertEquals
junit.framework.assert.assertEquals
junit.framework.testcase.assertEquals

Which one should I use and why?

Edit:

As compared to the question differences between 2 JUnit Assert classes this question lists three possible imports as compared to two for the other question.

هل كانت مفيدة؟

المحلول

Do not use any classes in junit.framework or junit.extensions

Package junit.framework.* was used in JUnit 3.

Package org.junit.* is used in JUnit 4.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top