public void SemmleQLConverter_SimpleCsv() { var semmleCsvInput = SemmleCsvRecord.BuildDefaultRecord().ToCsv(); string expected = @"{ ""$schema"": """ + SarifUtilities.SarifSchemaUri + @""", ""version"": ""2.0.0"", ""runs"": [ { ""tool"": { ""name"": ""Semmle QL"" }, ""columnKind"": ""utf16CodeUnits"", ""files"": { ""#$srcroot#RelativePath"": { ""mimeType"": ""application/octet-stream"" } }, ""results"": [ { ""level"": ""error"", ""message"": { ""text"": ""Message"" }, ""locations"": [ { ""physicalLocation"": { ""fileLocation"": { ""uri"": ""RelativePath"", ""uriBaseId"": ""$srcroot"" }, ""region"": { ""startLine"": 1, ""startColumn"": 2, ""endLine"": 3, ""endColumn"": 4 } } } ] } ] } ] }"; RunTestCase(semmleCsvInput, expected, prettyPrint: true); }
public void SemmleQLConverter_SimpleCsv() { var semmleCsvInput = SemmleCsvRecord.BuildDefaultRecord().ToCsv(); string expected = @"{ ""$schema"": ""http://json.schemastore.org/sarif-1.0.0"", ""version"": ""1.0.0"", ""runs"": [ { ""tool"": { ""name"": ""Semmle QL"" }, ""files"": { ""RelativePath"": { ""mimeType"": ""application/octet-stream"" } }, ""results"": [ { ""level"": ""error"", ""message"": ""Message"", ""locations"": [ { ""resultFile"": { ""uri"": ""RelativePath"", ""uriBaseId"": ""$srcroot"", ""region"": { ""startLine"": 1, ""startColumn"": 2, ""endLine"": 3, ""endColumn"": 4 } } } ] } ] } ] }"; RunTestCase(semmleCsvInput, expected, prettyPrint: true); }