@@ -7,19 +7,21 @@ namespace Test;
7
7
8
8
public class TestTransform
9
9
{
10
+ private static readonly JsonSerializerOptions JsonSerializerOptions = new JsonSerializerOptions
11
+ {
12
+ WriteIndented = true ,
13
+ PropertyNamingPolicy = new LowerCaseNamingPolicy ( ) ,
14
+ Converters = { new JsonStringEnumConverter ( ) }
15
+ } ;
16
+
10
17
[ Fact ]
11
18
public void TestTransformAllWorks ( )
12
19
{
13
20
var target = new FileInfo ( Path . GetTempFileName ( ) ) ;
14
21
15
22
Transform . TransformAll ( "**/**.sarif.json" , "**/*roslynator.xml" , target , null , true ) ;
16
23
17
- var options = new JsonSerializerOptions
18
- {
19
- WriteIndented = true ,
20
- PropertyNamingPolicy = new LowerCaseNamingPolicy ( ) ,
21
- Converters = { new JsonStringEnumConverter ( ) }
22
- } ;
24
+ var options = JsonSerializerOptions ;
23
25
24
26
using var r = new StreamReader ( target . FullName ) ;
25
27
var json = r . ReadToEnd ( ) ;
@@ -33,14 +35,9 @@ public void TestTransformCreatesExpectedPath()
33
35
{
34
36
var target = new FileInfo ( Path . GetTempFileName ( ) ) ;
35
37
36
- Transform . TransformAll ( "codeanalysis.sarif4.json" , "" , target , null , true ) ;
38
+ Transform . TransformAll ( "codeanalysis.sarif4.json" , "" , target , @"/builds/39753701/backend" , true ) ;
37
39
38
- var options = new JsonSerializerOptions
39
- {
40
- WriteIndented = true ,
41
- PropertyNamingPolicy = new LowerCaseNamingPolicy ( ) ,
42
- Converters = { new JsonStringEnumConverter ( ) }
43
- } ;
40
+ var options = JsonSerializerOptions ;
44
41
45
42
using var r = new StreamReader ( target . FullName ) ;
46
43
var json = r . ReadToEnd ( ) ;
0 commit comments