Package net.sourceforge.squirrel_sql.client.update.downloader

Examples of net.sourceforge.squirrel_sql.client.update.downloader.ArtifactDownloader


    DownloadStatusEventHandler mockDownloadStatusListener =
      mockHelper.createMock("mockDownloadStatusEventHandler", DownloadStatusEventHandler.class);
    ProxySettings mockProxySettings = mockHelper.createMock("mockProxySettings", ProxySettings.class);
    ArtifactDownloaderFactory mockArtifactDownloaderFactory =
      mockHelper.createMock("ArtifactDownloaderFactory", ArtifactDownloaderFactory.class);
    ArtifactDownloader mockArtifactDownloader =
      mockHelper.createMock("mockArtifactDownloader", ArtifactDownloader.class);

    expect(mockArtifactStatus.getArtifactAction()).andStubReturn(ArtifactAction.INSTALL);

    artifactStatusList.add(mockArtifactStatus);

    expect(mockArtifactDownloaderFactory.create(artifactStatusList)).andStubReturn(mockArtifactDownloader);

    mockArtifactDownloader.setUtil(mockUpdateUtil);
    mockArtifactDownloader.setProxySettings(mockProxySettings);
    mockArtifactDownloader.setIsRemoteUpdateSite(true);
    mockArtifactDownloader.setHost(TEST_UPDATE_SERVER);
    mockArtifactDownloader.setPort(TEST_UPDATE_SERVER_PORT);
    mockArtifactDownloader.setPath(TEST_PATH);
    mockArtifactDownloader.setFileSystemUpdatePath("");
    mockArtifactDownloader.addDownloadStatusListener(mockDownloadStatusListener);
    mockArtifactDownloader.setChannelName(TEST_CHANNEL);
    mockArtifactDownloader.setReleaseVersionWillChange(true);
    mockArtifactDownloader.start();

    mockDownloadStatusListener.setDownloader(mockArtifactDownloader);

    expect(mockApplication.getSquirrelPreferences()).andStubReturn(mockSquirrelPreferences);
    expect(mockSquirrelPreferences.getProxySettings()).andStubReturn(mockProxySettings);
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.client.update.downloader.ArtifactDownloader

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.