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

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

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