You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to mock this class using powerMock,when i try to test it thrown
java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
why ??? How to mock it?
class:
public final class ContentFacade
{
private ContentFacade()
{
contentService = (ContentService)
BaselineStartUp.getApplicationContext().getBean("contentService");
folderContentService = (FolderContentService)
BaselineStartUp.getApplicationContext().getBean("folderContentService");
providerService = (ProviderService)
BaselineStartUp.getApplicationContext().getBean("providerService");
basicService = (BasicService)BaselineStartUp.getApplicationContext
().getBean("basicService");
unknowTerm = (TerminalInfo)BaselineStartUp.getApplicationContext
().getBean("unknowTerm");
}
public static ContentFacade getInstance()
{
return INSTANCE;
}
}
test:
ContentFacade cfde=PowerMock.createMock(ContentFacade.class);
Please provide any additional information below.
Original issue reported on code.google.com by anuopass...@gmail.com on 17 May 2010 at 5:13
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
anuopass...@gmail.com
on 17 May 2010 at 5:13The text was updated successfully, but these errors were encountered: