File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 11using  PuppeteerSharp . TestServer ; 
22using  System ; 
33using  System . Threading . Tasks ; 
4+ using  Xunit ; 
45
56namespace  PuppeteerSharp . Tests 
67{ 
7-     public  sealed  class  PuppeteerLoaderFixture  :  IDisposable 
8+     public  sealed  class  PuppeteerLoaderFixture  :  IAsyncLifetime 
89    { 
910        public  static   SimpleServer  Server  {  get ;  private  set ;  } 
1011        public  static   SimpleServer  HttpsServer  {  get ;  private  set ;  } 
1112
12-         public  PuppeteerLoaderFixture ( ) 
13-         { 
14-             SetupAsync ( ) . GetAwaiter ( ) . GetResult ( ) ; 
15-         } 
13+         Task  IAsyncLifetime . InitializeAsync ( )  =>  SetupAsync ( ) ; 
1614
17-         public  void  Dispose ( ) 
18-         { 
19-             Task . WaitAll ( Server . StopAsync ( ) ,  HttpsServer . StopAsync ( ) ) ; 
20-         } 
15+         Task  IAsyncLifetime . DisposeAsync ( )  =>  Task . WhenAll ( Server . StopAsync ( ) ,  HttpsServer . StopAsync ( ) ) ; 
2116
2217        private  async  Task  SetupAsync ( ) 
2318        { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments