java - Junit test; Is it possible to configure a Bean's default property, before application context starts up? -


i have bean property "dbserver"; has default of "location1";

during application startup, depending on value of "dbserver", different classes instantiated.

i have 200 tests default setting fine.

however, of now,i test alternative.

question:

is there way within junit test case reset default before application context starts ?

junit won't start application context unless write setup method under @before annotation. in case can initialize bean values.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -