From: Joel S. <joe...@ya...> - 2003-10-07 02:46:45
|
How are people testing JNDI lookups and such? I see a MockContext class in the mockobjects library, but nothing about MockInitialContextFactory. Ie. if a class calls new InitialContext() what do you do to test it by controlling what it recieves? I tried to write a quick and dirty mock for InitialContextFactory but ran into trouble because it's loaded in a different class loader. So even setting a static variable on the class did not work. So I'm wondering what other people are doing to test this? -joel __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |