Skip to main content



      Home
Home » Newcomers » Newcomers » JUnit test case assertion issue
JUnit test case assertion issue [message #1844026] Fri, 27 August 2021 22:11 Go to next message
Eclipse UserFriend
Good day,

New to Java and Eclipse. Working through the tutorials found here: eclipsetutorial.sourceforge.net/totalbeginner

In lesson 4 we use the JUnit Test Case and I get "The type org.junit.Assert is not accessible" I've checked the class build path and it is listed under the Libraries tab under Classpath.

I have spent the last two days googling and have not found anything that helps. Suggestions/recommendations?

Thank you,

Jim
Re: JUnit test case assertion issue [message #1844032 is a reply to message #1844026] Sat, 28 August 2021 12:25 Go to previous messageGo to next message
Eclipse UserFriend
org.junit.Assert is the name of a type. While you can expand the JAR file in the Project Explorer or Package
Explorer to see whether it's a false error, it's usually not. What's the name of the jar file? As JUnit has had
multiple versions out since that tutorial, it might simply be out of date.

[Updated on: Sat, 28 August 2021 12:25] by Moderator

Re: JUnit test case assertion issue [message #1844034 is a reply to message #1844032] Sat, 28 August 2021 15:33 Go to previous message
Eclipse UserFriend
The jar file listed is org.junit_4.13.0.v20200204-1500.jar

I have also tried deleting and recreating the entire project using both JUnit 3 and JUnit 5 and get the exact same error.
Previous Topic:SetDefaultDllDirectories': is not a member of '`global namespace
Next Topic:Eclipse + JFreeChart
Goto Forum:
  


Current Time: Fri Jul 04 03:06:51 EDT 2025

Powered by FUDForum. Page generated in 1.46730 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top