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);