Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 37b05a7

Browse files
committed
Ammend some tests in RepositoryCloneServiceTests to not use data.
1 parent 933a105 commit 37b05a7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/GitHub.App.UnitTests/Services/RepositoryCloneServiceTests.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ await usageTracker.Received(numberOfCalls).IncrementCounter(
121121
((MemberExpression)x.Body).Member.Name == counterName));
122122
}
123123

124-
[TestCase("https://github.com/failing/url", @"c:\dev\bar")]
125-
public async Task CleansDirectoryOnCloneFailed(string cloneUrl, string clonePath)
124+
[Test]
125+
public async Task CleansDirectoryOnCloneFailed()
126126
{
127+
var cloneUrl = "https://github.com/failing/url";
128+
var clonePath = @"c:\dev\bar";
127129
var operatingSystem = Substitute.For<IOperatingSystem>();
128130
var vsGitServices = Substitute.For<IVSGitServices>();
129131
vsGitServices.Clone(cloneUrl, clonePath, true).Returns(x => { throw new Exception(); });
@@ -136,9 +138,11 @@ public async Task CleansDirectoryOnCloneFailed(string cloneUrl, string clonePath
136138
await vsGitServices.Received().Clone(cloneUrl, clonePath, true);
137139
}
138140

139-
[TestCase("https://github.com/foo/bar", @"c:\empty\directory")]
140-
public async Task CloneIntoEmptyDirectory(string cloneUrl, string clonePath)
141+
[Test]
142+
public async Task CloneIntoEmptyDirectory()
141143
{
144+
var cloneUrl = "https://github.com/foo/bar";
145+
var clonePath = @"c:\empty\directory";
142146
var operatingSystem = Substitute.For<IOperatingSystem>();
143147
operatingSystem.Directory.DirectoryExists(clonePath).Returns(true);
144148
operatingSystem.Directory.IsEmpty(clonePath).Returns(true);

0 commit comments

Comments
 (0)