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

Commit bf4a04d

Browse files
Updating with OnHeadUpdated signature
1 parent 77ee03b commit bf4a04d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/tests/IntegrationTests/Events/RepositoryWatcherTests.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public async Task ShouldDetectFileChanges()
4444
Logger.Trace("Continue test");
4545

4646
repositoryWatcherListener.DidNotReceive().ConfigChanged();
47-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
47+
repositoryWatcherListener.DidNotReceive().HeadChanged();
4848
repositoryWatcherListener.Received().IndexChanged();
4949
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
5050
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -90,7 +90,7 @@ public async Task ShouldDetectBranchChange()
9090
Logger.Trace("Continue test");
9191

9292
repositoryWatcherListener.DidNotReceive().ConfigChanged();
93-
repositoryWatcherListener.Received(1).HeadChanged("ref: refs/heads/feature/document");
93+
repositoryWatcherListener.Received().HeadChanged();
9494
repositoryWatcherListener.Received().IndexChanged();
9595
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
9696
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -135,7 +135,7 @@ public async Task ShouldDetectBranchDelete()
135135
Logger.Trace("Continue test");
136136

137137
repositoryWatcherListener.Received(1).ConfigChanged();
138-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
138+
repositoryWatcherListener.DidNotReceive().HeadChanged();
139139
repositoryWatcherListener.DidNotReceive().IndexChanged();
140140
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
141141
repositoryWatcherListener.Received(1).LocalBranchDeleted("feature/document");
@@ -179,7 +179,7 @@ public async Task ShouldDetectBranchCreate()
179179
Logger.Trace("Continue test");
180180

181181
repositoryWatcherListener.DidNotReceive().ConfigChanged();
182-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
182+
repositoryWatcherListener.DidNotReceive().HeadChanged();
183183
repositoryWatcherListener.DidNotReceive().IndexChanged();
184184
repositoryWatcherListener.Received(1).LocalBranchCreated("feature/document2");
185185
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -201,7 +201,7 @@ public async Task ShouldDetectBranchCreate()
201201
Logger.Trace("Continue test");
202202

203203
repositoryWatcherListener.DidNotReceive().ConfigChanged();
204-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
204+
repositoryWatcherListener.DidNotReceive().HeadChanged();
205205
repositoryWatcherListener.DidNotReceive().IndexChanged();
206206
repositoryWatcherListener.Received(1).LocalBranchCreated("feature2/document2");
207207
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -250,7 +250,7 @@ public async Task ShouldDetectChangesToRemotes()
250250
Logger.Trace("Continue test");
251251

252252
repositoryWatcherListener.Received().ConfigChanged();
253-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
253+
repositoryWatcherListener.DidNotReceive().HeadChanged();
254254
repositoryWatcherListener.DidNotReceive().IndexChanged();
255255
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
256256
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -275,7 +275,7 @@ public async Task ShouldDetectChangesToRemotes()
275275
Logger.Trace("Continue 2nd test");
276276

277277
repositoryWatcherListener.Received().ConfigChanged();
278-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
278+
repositoryWatcherListener.DidNotReceive().HeadChanged();
279279
repositoryWatcherListener.DidNotReceive().IndexChanged();
280280
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
281281
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -321,7 +321,7 @@ public async Task ShouldDetectGitPull()
321321
Logger.Trace("Continue test");
322322

323323
repositoryWatcherListener.DidNotReceive().ConfigChanged();
324-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
324+
repositoryWatcherListener.DidNotReceive().HeadChanged();
325325
repositoryWatcherListener.Received().IndexChanged();
326326
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
327327
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -366,7 +366,7 @@ public async Task ShouldDetectGitFetch()
366366
Logger.Trace("Continue test");
367367

368368
repositoryWatcherListener.DidNotReceive().ConfigChanged();
369-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
369+
repositoryWatcherListener.DidNotReceive().HeadChanged();
370370
repositoryWatcherListener.DidNotReceive().IndexChanged();
371371
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
372372
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);
@@ -394,7 +394,7 @@ private RepositoryWatcher CreateRepositoryWatcher(NPath path)
394394
public interface IRepositoryWatcherListener
395395
{
396396
void ConfigChanged();
397-
void HeadChanged(string obj);
397+
void HeadChanged();
398398
void IndexChanged();
399399
void LocalBranchCreated(string branch);
400400
void LocalBranchDeleted(string branch);
@@ -411,10 +411,10 @@ public static void AttachListener(this IRepositoryWatcherListener listener, IRep
411411
{
412412
var logger = trace ? Logging.GetLogger<IRepositoryWatcherListener>() : null;
413413

414-
repositoryWatcher.HeadChanged += s =>
414+
repositoryWatcher.HeadChanged += () =>
415415
{
416-
logger?.Trace("HeadChanged: {0}", s);
417-
listener.HeadChanged(s);
416+
logger?.Trace("HeadChanged");
417+
listener.HeadChanged();
418418
autoResetEvent?.HeadChanged.Set();
419419
};
420420

@@ -485,7 +485,7 @@ public static void AttachListener(this IRepositoryWatcherListener listener, IRep
485485
public static void AssertDidNotReceiveAnyCalls(this IRepositoryWatcherListener repositoryWatcherListener)
486486
{
487487
repositoryWatcherListener.DidNotReceive().ConfigChanged();
488-
repositoryWatcherListener.DidNotReceive().HeadChanged(Args.String);
488+
repositoryWatcherListener.DidNotReceive().HeadChanged();
489489
repositoryWatcherListener.DidNotReceive().IndexChanged();
490490
repositoryWatcherListener.DidNotReceive().LocalBranchCreated(Args.String);
491491
repositoryWatcherListener.DidNotReceive().LocalBranchDeleted(Args.String);

0 commit comments

Comments
 (0)