Skip to content

Commit

Permalink
Added failing tests for libdirhelper
Browse files Browse the repository at this point in the history
  • Loading branch information
Christiaan baes committed Feb 14, 2013
1 parent 2d8224a commit a27b035
Show file tree
Hide file tree
Showing 3 changed files with 2,469 additions and 2,363 deletions.
15 changes: 6 additions & 9 deletions Chocolatey Explorer/View/PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
using System.Windows.Forms;
using Chocolatey.Explorer.Model;
using Chocolatey.Explorer.Services;
using log4net;
using Chocolatey.Explorer.Services.FileStorageService;
using log4net;

namespace Chocolatey.Explorer.View
{
Expand All @@ -19,21 +18,19 @@ public partial class PackageManager : Form,IPackageManager
private delegate void PackageServiceRunFinishedHandler();
private readonly IPackagesService _packagesService;
private readonly IPackageVersionService _packageVersionService;
private readonly IPackageService _packageService;
private readonly IFileStorageService _fileStorageService;
private readonly IPackageService _packageService;

public PackageManager(): this(new PackagesService(),new PackageVersionService(),new PackageService(), new LocalFileSystemStorageService())
public PackageManager(): this(new PackagesService(),new PackageVersionService(),new PackageService())
{
}

public PackageManager(IPackagesService packagesService, IPackageVersionService packageVersionService, IPackageService packageService, IFileStorageService fileStorageService)
public PackageManager(IPackagesService packagesService, IPackageVersionService packageVersionService, IPackageService packageService)
{
InitializeComponent();

_packageService = packageService;
_packagesService = packagesService;
_packageVersionService = packageVersionService;
_fileStorageService = fileStorageService;
_packageVersionService = packageVersionService;
_packageVersionService.VersionChanged += VersionChangedHandler;
_packagesService.RunFinshed += PackagesServiceRunFinished;
_packageService.LineChanged += PackageServiceLineChanged;
Expand Down Expand Up @@ -251,7 +248,7 @@ private void QueryInstalledPackages()
var settings = new Properties.Settings();
searchPackages.Text = "";
var expandedLibDirectory = System.Environment.ExpandEnvironmentVariables(settings.ChocolateyLibDirectory);
if (!_fileStorageService.DirectoryExists(expandedLibDirectory))
if (!System.IO.Directory.Exists(expandedLibDirectory))
{
MessageBox.Show(string.Format(strings.lib_dir_not_found, expandedLibDirectory));
}
Expand Down

0 comments on commit a27b035

Please sign in to comment.