public void OpenPackagePrintsPathToPackageIfItCannotBeRead() { // Arrange var fileSystem = new MockFileSystem(); fileSystem.AddFile(@"Foo.nupkg"); var pathResolver = new DefaultPackagePathResolver(fileSystem); var repository = new LocalPackageRepository(pathResolver, fileSystem); // Act and Assert ExceptionAssert.Throws <InvalidDataException>(() => repository.OpenPackage(@"Foo.nupkg"), "Unable to read package from path 'Foo.nupkg'."); }