@@ -193,29 +193,32 @@ public void TemplateIsUsedIfPresent()
193193 }
194194
195195 [ Fact ]
196- public void FormClearsOnCancel ( )
196+ public async Task FormClearsOnCancel ( )
197197 {
198198 var data = PrepareTestData ( "octokit.net" , "shana" , "master" , "octokit" , "notmaster" , "origin" , true , true ) ;
199199 var prservice = new PullRequestService ( data . GitClient , data . GitService , data . ServiceProvider . GetOperatingSystem ( ) , Substitute . For < IUsageTracker > ( ) ) ;
200+
200201 var vm = new PullRequestCreationViewModel ( data . RepositoryHost , data . ActiveRepo , prservice , data . NotificationService ) ;
202+ vm . Initialize ( ) ;
201203 vm . PRTitle = "a title" ;
202204 vm . Description = "a description" ;
203- vm . CancelCommand . ExecuteAsync ( ) ;
205+ vm . TargetBranch = new BranchModel ( "notmaster" , data . TargetRepo ) ;
206+ await vm . CancelCommand . ExecuteAsync ( ) ;
204207
205208 Assert . Equal ( "master" , vm . TargetBranch . Name ) ;
206209 Assert . Equal ( string . Empty , vm . PRTitle ) ;
207210 Assert . Equal ( string . Empty , vm . Description ) ;
208211 }
209212
210213 [ Fact ]
211- public void FormClearsOnCreation ( )
214+ public async Task FormClearsOnCreation ( )
212215 {
213216 var data = PrepareTestData ( "octokit.net" , "shana" , "master" , "octokit" , "notmaster" , "origin" , true , true ) ;
214217 var prservice = new PullRequestService ( data . GitClient , data . GitService , data . ServiceProvider . GetOperatingSystem ( ) , Substitute . For < IUsageTracker > ( ) ) ;
215218 var vm = new PullRequestCreationViewModel ( data . RepositoryHost , data . ActiveRepo , prservice , data . NotificationService ) ;
216219 vm . PRTitle = "a title" ;
217220 vm . Description = "a description" ;
218- vm . CreatePullRequest . ExecuteAsync ( ) ;
221+ await vm . CreatePullRequest . ExecuteAsync ( ) ;
219222
220223 Assert . Equal ( "master" , vm . TargetBranch . Name ) ;
221224 Assert . Equal ( string . Empty , vm . PRTitle ) ;
0 commit comments