java - How to initialize test class before context initialization while Spring testing? -


i have beans reading , writing data on disk while working , configuring , work these files during tests.

for example, prepare files on disk before context configuration , after of configuration before tests.

how use run code @ these moments?

if using @runwith(springjunit4classrunner.class) provide different class, based on spring's, , override methods execute want before context initialized. can setup , tear down in test using @beforeclass , @afterclass.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -