|
|
|
@ -5,6 +5,7 @@ import com.fr.config.dao.impl.LocalClassHelperDao;
|
|
|
|
|
import com.fr.config.dao.impl.LocalEntityDao; |
|
|
|
|
import com.fr.config.dao.impl.LocalXmlEntityDao; |
|
|
|
|
import com.fr.design.actions.UpdateAction; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.notification.SnapChatAllTypes; |
|
|
|
|
import com.fr.design.notification.SnapChatConfig; |
|
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
@ -29,13 +30,14 @@ import java.awt.event.ActionEvent;
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
|
|
@RunWith(PowerMockRunner.class) |
|
|
|
|
@PrepareForTest({SnapChatConfig.class, SnapChatUpdateAction.class}) |
|
|
|
|
@PrepareForTest({Toolkit.class, SnapChatConfig.class, SnapChatUpdateAction.class}) |
|
|
|
|
@PowerMockIgnore({"javax.crypto.*","javax.net.ssl.*","sun.security.ssl.*","com.sun.*"}) |
|
|
|
|
public class SnapChatMenuDefTest { |
|
|
|
|
|
|
|
|
|
@Before |
|
|
|
|
public void before() throws Exception { |
|
|
|
|
|
|
|
|
|
PowerMock.mockStatic(Toolkit.class); |
|
|
|
|
EasyMock.expect(Toolkit.i18nText(EasyMock.anyString())).andReturn("test").anyTimes(); |
|
|
|
|
DaoContext.setXmlEntityDao(new LocalXmlEntityDao()); |
|
|
|
|
DaoContext.setClassHelperDao(new LocalClassHelperDao()); |
|
|
|
|
DaoContext.setEntityDao(new LocalEntityDao()); |
|
|
|
@ -46,7 +48,6 @@ public class SnapChatMenuDefTest {
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void testAddShortCut() throws Exception { |
|
|
|
|
|
|
|
|
|
PowerMock.suppress(MemberMatcher.constructor(UpdateAction.class)); |
|
|
|
|
SnapChatConfig snapChatConfig = EasyMock.partialMockBuilder(SnapChatConfig.class) |
|
|
|
|
.addMockedMethod("readXML") |
|
|
|
|