This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
test/GitHub.App.UnitTests/ViewModels Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments