@@ -22,40 +22,40 @@ public class ColumnizerPickerTest
2222 [ TestCase ( "Timestamp Columnizer" , "30/08/2018 08:51:42.712 no bracket 1" , "30/08/2018 08:51:42.712 no bracket 2" , "30/08/2018 08:51:42.712 [TRACE] with bracket 1" , "30/08/2018 08:51:42.712 [TRACE] with bracket 2" , "no bracket 3" ) ]
2323 public void FindColumnizer_ReturnCorrectColumnizer ( string expectedColumnizerName , string line0 , string line1 , string line2 , string line3 , string line4 )
2424 {
25- var path = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , "test" ) ;
25+ var path = Path . Join ( AppDomain . CurrentDomain . BaseDirectory , "test" ) ;
2626
2727 Mock < IAutoLogLineColumnizerCallback > autoLogLineColumnizerCallbackMock = new ( ) ;
2828
29- autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 0 ) ) . Returns ( new TestLogLine ( )
29+ _ = autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 0 ) ) . Returns ( new TestLogLine ( )
3030 {
3131 FullLine = line0 ,
3232 LineNumber = 0
3333 } ) ;
3434
35- autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 1 ) ) . Returns ( new TestLogLine ( )
35+ _ = autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 1 ) ) . Returns ( new TestLogLine ( )
3636 {
3737 FullLine = line1 ,
3838 LineNumber = 1
3939 } ) ;
4040
41- autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 2 ) ) . Returns ( new TestLogLine ( )
41+ _ = autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 2 ) ) . Returns ( new TestLogLine ( )
4242 {
4343 FullLine = line2 ,
4444 LineNumber = 2
4545 } ) ;
4646
47- autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 3 ) ) . Returns ( new TestLogLine ( )
47+ _ = autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 3 ) ) . Returns ( new TestLogLine ( )
4848 {
4949 FullLine = line3 ,
5050 LineNumber = 3
5151 } ) ;
52- autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 4 ) ) . Returns ( new TestLogLine ( )
52+ _ = autoLogLineColumnizerCallbackMock . Setup ( a => a . GetLogLine ( 4 ) ) . Returns ( new TestLogLine ( )
5353 {
5454 FullLine = line4 ,
5555 LineNumber = 4
5656 } ) ;
5757
58- var result = ColumnizerPicker . FindColumnizer ( path , autoLogLineColumnizerCallbackMock . Object , LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
58+ var result = ColumnizerPicker . FindColumnizer ( path , autoLogLineColumnizerCallbackMock . Object , PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
5959
6060 Assert . That ( result . GetName ( ) , Is . EqualTo ( expectedColumnizerName ) ) ;
6161 }
@@ -66,16 +66,16 @@ public void FindColumnizer_ReturnCorrectColumnizer (string expectedColumnizerNam
6666 public void FindReplacementForAutoColumnizer_ValidTextFile_ReturnCorrectColumnizer (
6767 string fileName , Type columnizerType )
6868 {
69- var path = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , fileName ) ;
70- LogfileReader reader = new ( path , new EncodingOptions ( ) , true , 40 , 50 , new MultiFileOptions ( ) , false , LogExpert . PluginRegistry . PluginRegistry . Instance ) ;
69+ var path = Path . Join ( AppDomain . CurrentDomain . BaseDirectory , fileName ) ;
70+ LogfileReader reader = new ( path , new EncodingOptions ( ) , true , 40 , 50 , new MultiFileOptions ( ) , false , PluginRegistry . PluginRegistry . Instance ) ;
7171 reader . ReadFiles ( ) ;
7272
7373 Mock < ILogLineColumnizer > autoColumnizer = new ( ) ;
74- autoColumnizer . Setup ( a => a . GetName ( ) ) . Returns ( "Auto Columnizer" ) ;
74+ _ = autoColumnizer . Setup ( a => a . GetName ( ) ) . Returns ( "Auto Columnizer" ) ;
7575
7676 // TODO: When DI container is ready, we can mock this set up.
77- LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonCompactColumnizer ( ) ) ;
78- var result = ColumnizerPicker . FindReplacementForAutoColumnizer ( fileName , reader , autoColumnizer . Object , LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
77+ PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonCompactColumnizer ( ) ) ;
78+ var result = ColumnizerPicker . FindReplacementForAutoColumnizer ( fileName , reader , autoColumnizer . Object , PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
7979
8080 Assert . That ( columnizerType , Is . EqualTo ( result . GetType ( ) ) ) ;
8181 }
@@ -84,11 +84,11 @@ public void FindReplacementForAutoColumnizer_ValidTextFile_ReturnCorrectColumniz
8484 public void DecideColumnizerByName_WhenReaderIsNotReady_ReturnCorrectColumnizer (
8585 string fileName , Type columnizerType )
8686 {
87- var path = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , fileName ) ;
87+ var path = Path . Join ( AppDomain . CurrentDomain . BaseDirectory , fileName ) ;
8888
8989 // TODO: When DI container is ready, we can mock this set up.
90- LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonCompactColumnizer ( ) ) ;
91- var result = ColumnizerPicker . DecideColumnizerByName ( fileName , LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
90+ PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonCompactColumnizer ( ) ) ;
91+ var result = ColumnizerPicker . DecideColumnizerByName ( fileName , PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
9292
9393 Assert . That ( columnizerType , Is . EqualTo ( result . GetType ( ) ) ) ;
9494 }
@@ -98,12 +98,12 @@ public void DecideColumnizerByName_WhenReaderIsNotReady_ReturnCorrectColumnizer
9898 public void DecideColumnizerByName_ValidTextFile_ReturnCorrectColumnizer (
9999 string columnizerName , Type columnizerType )
100100 {
101- var path = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , columnizerName ) ;
101+ var path = Path . Join ( AppDomain . CurrentDomain . BaseDirectory , columnizerName ) ;
102102
103103 // TODO: When DI container is ready, we can mock this set up.
104- LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonColumnizer . JsonColumnizer ( ) ) ;
104+ PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers . Add ( new JsonColumnizer . JsonColumnizer ( ) ) ;
105105
106- var result = ColumnizerPicker . DecideColumnizerByName ( columnizerName , LogExpert . PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
106+ var result = ColumnizerPicker . DecideColumnizerByName ( columnizerName , PluginRegistry . PluginRegistry . Instance . RegisteredColumnizers ) ;
107107
108108 Assert . That ( columnizerType , Is . EqualTo ( result . GetType ( ) ) ) ;
109109 }
0 commit comments