No value for attribute value before annotation

I usually do not experience problems with JUnit annotation. But for some reason today, with my new installation of Netbeans 7.2, I experience the following error when I use the @Before annotation:

 annotation before is missing value for the attribute value 

Does anyone know how to fix this?


UPDATE

I am writing a mavenized web-app. For TestCase, when I try to import org.junit.Before , the program instead imports org.aspectj.lang.annotation.Before

+4
source share
1 answer

Are you declaring dependency on an updated version of JUnit?

 <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> 

You should be able to import the correct class: org.junit.Before .

+4
source

Source: https://habr.com/ru/post/1436049/


All Articles