public void Create() { var analyzerFactory = new AnalyzerFactory { Assembly = Assembly.GetExecutingAssembly(), VulnerabilityDiscovered = OnVulnerabilityDiscovered }; List <ICsAnalyzer> csAnalyzers = analyzerFactory.GetCsAnalyzers(); Assert.AreEqual(1, csAnalyzers.Count); ICsAnalyzer analyzer = csAnalyzers[0]; Assert.IsInstanceOfType(analyzer, typeof(ExampleAnalyzer)); }
public Program() { AnalyzerFactory analyzerFactory = new AnalyzerFactory { VulnerabilityDiscovered = OnVulnerabilityDiscovered }; ScannerFactory = new ScannerFactory { CsAnalyzers = analyzerFactory.GetCsAnalyzers(), AndroidManifestAnalyzers = analyzerFactory.GetAndroidManifestAnalyzers(), TextAnalyzers = analyzerFactory.GetTextAnalyzers() }; EnvironmentWrapper = new EnvironmentWrapper(); }