Package utils

Examples of utils.EasyMockHelper


     * @param args
     */
    public static void main(String[] args) {
      ApplicationArguments.initialize(new String[] {});
     
      EasyMockHelper mockHelper = new EasyMockHelper();
     
      // mocks
      IApplication mockApplication = mockHelper.createMock(IApplication.class);
      SquirrelPreferences mockPreferences = mockHelper.createMock(SquirrelPreferences.class);
      IUpdateSettings mockUpdateSettings = mockHelper.createMock(IUpdateSettings.class);
     
      expect(mockApplication.getSquirrelPreferences()).andStubReturn(mockPreferences);
      expect(mockPreferences.getUpdateSettings()).andStubReturn(mockUpdateSettings);
      expect(mockUpdateSettings.getUpdateServer()).andStubReturn("aTestServer");
      expect(mockUpdateSettings.getUpdateServerPort()).andStubReturn("aTestServerPort");
      expect(mockUpdateSettings.getUpdateServerPath()).andStubReturn("aTestServerPath");
      expect(mockUpdateSettings.getUpdateServerChannel()).andStubReturn("aTestServerChannel");
      expect(mockUpdateSettings.isEnableAutomaticUpdates()).andStubReturn(true);
      expect(mockUpdateSettings.getUpdateCheckFrequency()).andReturn("Daily");
      expect(mockUpdateSettings.isRemoteUpdateSite()).andReturn(true);
      expect(mockUpdateSettings.getFileSystemUpdatePath()).andReturn("");
     
      mockHelper.replayAll();
     
       
       
       
        final JFrame frame = new JFrame("Test UpdatePreferencesPanel");
View Full Code Here

TOP

Related Classes of utils.EasyMockHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.