public FileDiffingUnitTests(ITestOutputHelper outputHelper, bool testProducesSarifCurrentVersion = true)
        {
            _outputHelper = outputHelper;
            _testProducesSarifCurrentVersion = testProducesSarifCurrentVersion;
            _resourceExtractor = new ResourceExtractor(this.GetType());

            Directory.CreateDirectory(OutputFolderPath);
        }
 private static string GetResourceContents(string resourceName)
 => ResourceExtractor.GetResourceText($"SarifLogger.{resourceName}");
Exemple #3
0
        public static SarifLog GetSarifLogFromResource(ResourceExtractor extractor, string resourceName)
        {
            string logFileContents = extractor.GetResourceText(resourceName);

            return(JsonConvert.DeserializeObject <SarifLog>(logFileContents));
        }