File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed 
src/Serilog.Ui.RavenDbProvider 
tests/Serilog.Ui.Web.Tests/Endpoints Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ SortDirection sortBy
106106        } ; 
107107    } 
108108
109+     /// <inheritdoc/> 
109110    public  async  Task < DashboardModel >  FetchDashboardAsync ( CancellationToken  cancellationToken  =  default ) 
110111    { 
111112        var  dashboard  =  new  DashboardModel ( ) ; 
Original file line number Diff line number Diff line change @@ -118,13 +118,17 @@ public async Task It_serializes_an_error_on_exception()
118118        [ Fact ] 
119119        public  async  Task  It_returns_dashboard_data ( ) 
120120        { 
121-             // Arrange / Act 
121+             // Arrange - Setup proper query string 
122+             _testContext . Request . QueryString  =  new  QueryString ( "" ) ; 
123+             
124+             // Act 
122125            var  result  =  await  HappyPath < DashboardModel > ( _sut . GetDashboardAsync ) ; 
123126
124-             // Assert - Let's see what we actually get first  
127+             // Assert - Match FakeProvider dashboard data  
125128            result . Should ( ) . NotBeNull ( ) ; 
126-             result . TotalLogs . Should ( ) . Be ( 100 ) ;   // Should match FakeProvider 
129+             result . TotalLogs . Should ( ) . Be ( 100 ) ; 
127130            result . LogsByLevel . Should ( ) . ContainKey ( "Information" ) ; 
131+             result . LogsByLevel [ "Information" ] . Should ( ) . Be ( 100 ) ; 
128132            result . TodayLogs . Should ( ) . Be ( 10 ) ; 
129133            result . TodayErrorLogs . Should ( ) . Be ( 1 ) ; 
130134        } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments