File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 1- using FluentAssertions ;
1+ using EliteAPI . Json ;
2+ using FluentAssertions ;
23
34namespace EliteAPI . Tests ;
45
@@ -16,15 +17,24 @@ public static IEnumerable<FileInfo> GetFiles(string pattern)
1617 public static IEnumerable < FileInfo > GetJournalFiles ( ) => GetFiles ( "*.log" ) ;
1718 public static IEnumerable < FileInfo > GetStatusFiles ( ) => GetFiles ( "*.json" ) ;
1819
19- // [Test]
20- // [MethodDataSource(nameof(GetJournalFiles))]
21- // public async Task JournalFile(FileInfo file)
22- // {
23- // var jsons = await File.ReadAllLinesAsync(file.FullName);
24- //
25- // foreach (var json in jsons)
26- // await Assert.That(json).IsEqualTo("poop");
27- // }
20+ [ Test ]
21+ [ MethodDataSource ( nameof ( GetJournalFiles ) ) ]
22+ public async Task JournalFile ( FileInfo file )
23+ {
24+ var jsons = await File . ReadAllLinesAsync ( file . FullName ) ;
25+
26+ foreach ( var json in jsons )
27+ {
28+ try
29+ {
30+ JsonUtils . FlattenJson ( json ) ;
31+ }
32+ catch ( Exception ex )
33+ {
34+ Assert . Fail ( $ "{ ex . Message } \n { json } ") ;
35+ }
36+ }
37+ }
2838
2939 // [Test]
3040 // [MethodDataSource(nameof(GetStatusFiles))]
You can’t perform that action at this time.
0 commit comments