Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » JUnit test case assertion issue
JUnit test case assertion issue [message #1844026] Sat, 28 August 2021 02:11 Go to next message
James Whatley is currently offline James WhatleyFriend
Messages: 2
Registered: August 2021
Junior Member
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 16:25 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

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.


_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Sat, 28 August 2021 16:25]

Report message to a moderator

Re: JUnit test case assertion issue [message #1844034 is a reply to message #1844032] Sat, 28 August 2021 19:33 Go to previous message
James Whatley is currently offline James WhatleyFriend
Messages: 2
Registered: August 2021
Junior Member
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: Thu Apr 18 15:12:59 GMT 2024

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

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

Back to the top