Hi all!
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
Hi all!
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
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.)