mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 14:31:28 +00:00
28 lines
677 B
C#
28 lines
677 B
C#
using System.Net;
|
|
|
|
namespace TestNinja.Mocking
|
|
{
|
|
public class InstallerHelper
|
|
{
|
|
private string _setupDestinationFile;
|
|
|
|
public bool DownloadInstaller(string customerName, string installerName)
|
|
{
|
|
var client = new WebClient();
|
|
try
|
|
{
|
|
client.DownloadFile(
|
|
string.Format("http://example.com/{0}/{1}",
|
|
customerName,
|
|
installerName),
|
|
_setupDestinationFile);
|
|
|
|
return true;
|
|
}
|
|
catch (WebException)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
} |