Please, tell me:
How can I write unit test (e.g. with JUnit) for operation “insert into some table” when many properties for normal application work are saved in config files for application server?
Thanks!a
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can either:
Or
The second option won’t be possible if you use a shared singleton
ConfigurationSettings(or something similar) to get your configuration data. If that’s the case, use the first method – which is generally better anyway. (As your question demonstrates, different callers use different configuration techniques.)