I am writing a Spring server that serves JSON data, from MongoDB.
To test the components, I am following a tutorial which unit tests controllers here: http://ift.tt/1zpNUDt . This involves Autowiring the webApplicationContext.
However, I would like to populate the DB based on whether the server is runnning unit tests, or is in deploy mode.
Is there a way I can pass a configuration value to the ApplicationContext, such that the Application is mocked differently?
Aucun commentaire:
Enregistrer un commentaire