Java – Assert cannot be resolved

java

Description:"Assert cannot be resolved"
Resource :ConsumerAccountProfileAssertion.java
Path : /SCACCWSTest/src/test/java/ford/cucumber/cap/assertion
Location : line 81
Type :Java Problem Assert cannot be resolved
Eclipse OxygenWas

for(String outputFieldToBeVerified : outputFieldsToBeVerified) {
            switch (CommonUtils.trimAndConvertToUpperCase(outputFieldToBeVerified)) {
                case CommonConstants.OUTPUT_FIELD_CONSUMER_ID:
                    consumerBOFromDB = ConsumerAccountProfileDAO.getPartialName(consumerID);
                    Assert.assertTrue(consumerID!=null && consumerID.equals(consumerBOFromDB.getConsumerID()));
                    //10002224452,10007356852,"10013131152",consumerBOFromDB
                break;

Best Answer

If you intend to use JUnit, you'll need to import org.junit.Assert; and make sure you have JUnit in your classpath (see here for Eclipse Oxygen release). Or whatever assertion library.

Related Topic