In my java spring mvc app, I am trying to reset a bunch of records for test with Junit. but in line:
@DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
It complains with:
ClassMode cannot be resolved to a variable
Update:
I have added
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5</version>
</dependency>
but then it complains with other lines
@ActiveProfiles("test")
@Sql(scripts="requests-dataset.sql")
@DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
the error is:
ActiveProfiles cannot be resolved to a type
Sql cannot be resolved to a type
Sql cannot be resolved to a type