Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit d58984e

Browse files
Fixing build and unit test
1 parent 25b32d8 commit d58984e

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/GitHub.Api/IO/IFileSystem.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,5 @@ public interface IFileSystem
4444
char DirectorySeparatorChar { get; }
4545
bool ExistingPathIsDirectory(string path);
4646
void SetCurrentDirectory(string currentDirectory);
47-
byte[] ReadAllBytes(string path);
4847
}
4948
}

src/GitHub.Api/Tasks/DownloadTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ protected override void Run(bool success)
130130
result = Download();
131131
if (result && ValidationHash != null)
132132
{
133-
var md5 = fileSystem.CalculateMD5(Destination);
133+
var md5 = fileSystem.CalculateFileMD5(Destination);
134134
result = md5.Equals(ValidationHash, StringComparison.CurrentCultureIgnoreCase);
135135

136136
if (!result)

src/tests/IntegrationTests/Download/DownloadTaskTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task TestDownloadTask()
3131
var downloadPathBytes = fileSystem.ReadAllBytes(downloadPath);
3232
Logger.Trace("File size {0} bytes", downloadPathBytes.Length);
3333

34-
var md5Sum = fileSystem.CalculateMD5(downloadPath);
34+
var md5Sum = fileSystem.CalculateFileMD5(downloadPath);
3535
md5Sum.Should().Be(TestDownloadMD5.ToUpperInvariant());
3636

3737
var random = new Random();
@@ -48,7 +48,7 @@ public async Task TestDownloadTask()
4848
var downloadHalfPathBytes = fileSystem.ReadAllBytes(downloadHalfPath);
4949
Logger.Trace("File size {0} Bytes", downloadHalfPathBytes.Length);
5050

51-
md5Sum = fileSystem.CalculateMD5(downloadPath);
51+
md5Sum = fileSystem.CalculateFileMD5(downloadPath);
5252
md5Sum.Should().Be(TestDownloadMD5.ToUpperInvariant());
5353
}
5454

0 commit comments

Comments
 (0)