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

Commit 72a82e5

Browse files
Fixing tests
1 parent 122f767 commit 72a82e5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

test/GitHub.App.UnitTests/ViewModels/CommentThreadViewModelTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public async Task AddPlaceholder(bool isEditing)
113113
class TestComment : CommentViewModel
114114
{
115115
public TestComment()
116-
: base(Substitute.For<ICommentService>())
116+
: base(Substitute.For<ICommentService>(), Substitute.For<IAutoCompleteAdvisor>())
117117
{
118118
}
119119

test/GitHub.App.UnitTests/ViewModels/CommentViewModelTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,14 @@ await target.InitializeAsync(
6565
}
6666

6767
CommentViewModel CreateTarget(
68-
ICommentService commentService = null)
68+
ICommentService commentService = null,
69+
IAutoCompleteAdvisor autoCompleteAdvisor = null
70+
)
6971
{
7072
commentService = commentService ?? Substitute.For<ICommentService>();
73+
autoCompleteAdvisor = autoCompleteAdvisor ?? Substitute.For<IAutoCompleteAdvisor>();
7174

72-
return new CommentViewModel(commentService);
75+
return new CommentViewModel(commentService, autoCompleteAdvisor);
7376
}
7477
}
7578
}

test/GitHub.App.UnitTests/ViewModels/GitHubPane/PullRequestReviewAuthoringViewModelTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,15 @@ static PullRequestReviewAuthoringViewModel CreateTarget(
487487
IPullRequestSessionManager sessionManager = null,
488488
IMessageDraftStore draftStore = null,
489489
IPullRequestFilesViewModel files = null,
490-
IScheduler timerScheduler = null)
490+
IScheduler timerScheduler = null,
491+
IAutoCompleteAdvisor autoCompleteAdvisor = null
492+
)
491493
{
492494
editorService = editorService ?? Substitute.For<IPullRequestEditorService>();
493495
sessionManager = sessionManager ?? CreateSessionManager();
494496
draftStore = draftStore ?? Substitute.For<IMessageDraftStore>();
495497
files = files ?? Substitute.For<IPullRequestFilesViewModel>();
498+
autoCompleteAdvisor = autoCompleteAdvisor ?? Substitute.For<IAutoCompleteAdvisor>();
496499
timerScheduler = timerScheduler ?? DefaultScheduler.Instance;
497500

498501
return new PullRequestReviewAuthoringViewModel(
@@ -501,6 +504,7 @@ static PullRequestReviewAuthoringViewModel CreateTarget(
501504
sessionManager,
502505
draftStore,
503506
files,
507+
autoCompleteAdvisor,
504508
timerScheduler);
505509
}
506510

0 commit comments

Comments
 (0)