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

Commit 7f8011e

Browse files
committed
Update test to reflect no duplicate change events
1 parent 01c81b2 commit 7f8011e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/UnitTests/GitHub.TeamFoundation/VSGitExtTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ public void GitExtPropertyChangedEvent_ActiveRepositoriesChangedIsFired()
7676
}
7777

7878
[Test]
79-
public void ExceptionReadingActiveRepositories_ActiveRepositoriesChangedIsFired()
79+
public void ExceptionReadingActiveRepositories_StillEmptySoNoEvent()
8080
{
8181
var context = CreateVSUIContext(true);
82-
var gitExt = CreateGitExt();
82+
var gitExt = CreateGitExt(new[] { "repoPath" });
8383
gitExt.ActiveRepositories.Returns(x => { throw new Exception("Boom!"); });
8484

8585
var target = CreateVSGitExt(context, gitExt);
@@ -89,8 +89,8 @@ public void ExceptionReadingActiveRepositories_ActiveRepositoriesChangedIsFired(
8989
var eventArgs = new PropertyChangedEventArgs(nameof(gitExt.ActiveRepositories));
9090
gitExt.PropertyChanged += Raise.Event<PropertyChangedEventHandler>(gitExt, eventArgs);
9191

92-
Assert.That(wasFired, Is.True);
9392
Assert.That(target.ActiveRepositories, Is.Empty);
93+
Assert.That(wasFired, Is.False);
9494
}
9595

9696
[Test]
@@ -205,7 +205,7 @@ static VSGitExt CreateVSGitExt(IVSUIContext context = null, IGitExt gitExt = nul
205205

206206
static IGitExt CreateGitExt(IList<string> repositoryPaths = null)
207207
{
208-
repositoryPaths = repositoryPaths ?? new string[0];
208+
repositoryPaths = repositoryPaths ?? Array.Empty<string>();
209209
var gitExt = Substitute.For<IGitExt>();
210210
var repoList = CreateActiveRepositories(repositoryPaths);
211211
gitExt.ActiveRepositories.Returns(repoList);

0 commit comments

Comments
 (0)