@@ -255,20 +255,7 @@ void AddCommentToExistingThread(IPullRequestSessionFile file)
255255 RaiseLinesChanged ( file , Tuple . Create ( thread . LineNumber , DiffSide . Right ) ) ;
256256 }
257257
258- IApiClientFactory CreateApiClientFactory ( )
259- {
260- var apiClient = Substitute . For < IApiClient > ( ) ;
261- apiClient . CreatePullRequestReviewComment ( null , null , 0 , null , 0 )
262- . ReturnsForAnyArgs ( _ => Observable . Return ( new PullRequestReviewComment ( ) ) ) ;
263- apiClient . CreatePullRequestReviewComment ( null , null , 0 , null , null , null , 0 )
264- . ReturnsForAnyArgs ( _ => Observable . Return ( new PullRequestReviewComment ( ) ) ) ;
265-
266- var result = Substitute . For < IApiClientFactory > ( ) ;
267- result . Create ( null ) . ReturnsForAnyArgs ( apiClient ) ;
268- return result ;
269- }
270-
271- InlineCommentModel CreateComment ( string body )
258+ static InlineCommentModel CreateComment ( string body )
272259 {
273260 return new InlineCommentModel
274261 {
@@ -280,7 +267,7 @@ InlineCommentModel CreateComment(string body)
280267 } ;
281268 }
282269
283- IViewViewModelFactory CreateFactory ( )
270+ static IViewViewModelFactory CreateFactory ( )
284271 {
285272 var draftStore = Substitute . For < IMessageDraftStore > ( ) ;
286273 var commentService = Substitute . For < ICommentService > ( ) ;
@@ -292,7 +279,7 @@ IViewViewModelFactory CreateFactory()
292279 return result ;
293280 }
294281
295- IInlineCommentThreadModel CreateThread ( int lineNumber , params string [ ] comments )
282+ static IInlineCommentThreadModel CreateThread ( int lineNumber , params string [ ] comments )
296283 {
297284 var result = Substitute . For < IInlineCommentThreadModel > ( ) ;
298285 var commentList = comments . Select ( x => CreateComment ( x ) ) . ToList ( ) ;
@@ -301,14 +288,14 @@ IInlineCommentThreadModel CreateThread(int lineNumber, params string[] comments)
301288 return result ;
302289 }
303290
304- IInlineCommentPeekService CreatePeekService ( int lineNumber )
291+ static IInlineCommentPeekService CreatePeekService ( int lineNumber )
305292 {
306293 var result = Substitute . For < IInlineCommentPeekService > ( ) ;
307294 result . GetLineNumber ( null , null ) . ReturnsForAnyArgs ( Tuple . Create ( lineNumber , false ) ) ;
308295 return result ;
309296 }
310297
311- IPeekSession CreatePeekSession ( )
298+ static IPeekSession CreatePeekSession ( )
312299 {
313300 var document = Substitute . For < ITextDocument > ( ) ;
314301 document . FilePath . Returns ( FullPath ) ;
@@ -322,7 +309,7 @@ IPeekSession CreatePeekSession()
322309 return result ;
323310 }
324311
325- IPullRequestSession CreateSession ( )
312+ static IPullRequestSession CreateSession ( )
326313 {
327314 var result = Substitute . For < IPullRequestSession > ( ) ;
328315 result . PullRequest . Returns ( new PullRequestDetailModel ( ) ) ;
@@ -331,7 +318,7 @@ IPullRequestSession CreateSession()
331318 return result ;
332319 }
333320
334- IPullRequestSessionManager CreateSessionManager (
321+ static IPullRequestSessionManager CreateSessionManager (
335322 string commitSha = "COMMIT" ,
336323 string relativePath = RelativePath ,
337324 IPullRequestSession session = null ,
@@ -378,13 +365,13 @@ IPullRequestSessionManager CreateSessionManager(
378365 return result ;
379366 }
380367
381- void RaiseLinesChanged ( IPullRequestSessionFile file , params Tuple < int , DiffSide > [ ] lineNumbers )
368+ static void RaiseLinesChanged ( IPullRequestSessionFile file , params Tuple < int , DiffSide > [ ] lineNumbers )
382369 {
383370 var subject = ( Subject < IReadOnlyList < Tuple < int , DiffSide > > > ) file . LinesChanged ;
384371 subject . OnNext ( lineNumbers ) ;
385372 }
386373
387- void RaisePropertyChanged < T > ( T o , string propertyName )
374+ static void RaisePropertyChanged < T > ( T o , string propertyName )
388375 where T : INotifyPropertyChanged
389376 {
390377 o . PropertyChanged += Raise . Event < PropertyChangedEventHandler > ( new PropertyChangedEventArgs ( propertyName ) ) ;
0 commit comments