#JUnit 5 library not working

21 messages · Page 1 of 1 (latest)

placid wigeon
#

Hi, my teacher gave me a JUnit test file intended for testing my code, the problem is that pops out the warning that "The type org.junit.jupiter.api.Assertions is not accessible". This happens even if the file is new and fresh created in Eclipse and it automatically imported the library.

wary urchinBOT
#

This post has been reserved for your question.

Hey @placid wigeon! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

lavish widget
#

can you share your module-info.java ?

placid wigeon
#
/**
 * 
 */
/**
 * @author stefa
 *
 */
module es {
}
#

This is my module-info.java

lavish widget
#

add requires org.junit.jupiter.api

placid wigeon
#

into the module?

lavish widget
#

yes into the module.

placid wigeon
#

Like this?

/**
 * 
 */
/**
 * @author stefa
 *
 */
module es {
    requires org.junit.jupiter.api;
}
lavish widget
#

yes.

placid wigeon
lavish widget
#

what's the quickfix ?

placid wigeon
#

There is no quickfix

lavish widget
#

alright alternative just delete module-info.java

#

lets see if that works.

placid wigeon
#

Ok lemme nuke it real quick

#

Welp tyvm

#

Solved after 3 hours of looking on the net

#

Thank you kind stranger, have a great day.

wary urchinBOT