/// <summary> /// Initializes a new instance of the <see cref="CodeQuerySyntaxTreeBuilder"/> class. /// </summary> public CodeQuerySyntaxTreeBuilder(ISelectorFactory selectorFactory, ICodeQueryCommandFactory treeFactory) { Assume.NotNull(treeFactory, nameof(treeFactory)); Assume.NotNull(selectorFactory, nameof(selectorFactory)); TreeFactory = treeFactory; SelectorFactory = selectorFactory; }
public WebDriver( IWebDriver seleniumDriver, Func <Uri> rootUrl, SeleniumGridConfiguration configuration, IRetryExecutor retryExecutor, ISelectorFactory selectorFactory, IElementFactory elementFactory, IXpathProvider xpathProvider, IMovieLogger movieLogger, IWebElementSourceLog webElementSourceLog, IEnumerable <SelectorPrefix> prefixes = null) { SeleniumDriver = seleniumDriver; SuccessfulSearchers = new List <Searcher>(); RootUrl = rootUrl; SeleniumGridConfiguration = configuration; RetryExecutor = retryExecutor; SelectorFactory = selectorFactory; MovieLogger = movieLogger; Prefixes = prefixes?.ToList() ?? new List <SelectorPrefix>() { new EmptySelectorPrefix() }; Children = new List <WebDriver>(); Screenshots = new List <byte[]>(); ElementFactory = elementFactory; XpathProvider = xpathProvider; WebElementSourceLog = webElementSourceLog; }
public WordSourceProvider(TextReaderFactory textReaderFactory, IWordReader textSplitter, IChangerFactory changerFactory, ISelectorFactory selectorFactory) { this.textReaderFactory = textReaderFactory; this.changerFactory = changerFactory; this.selectorFactory = selectorFactory; this.textSplitter = textSplitter; }
/// <summary> /// Initializes a new instance of the <see cref="DefaultSelectorResolver"/> class. /// </summary> public DefaultSelectorResolver(ISelectorFactory selectorFactory, IDescriptorRepository descriptorRepository, INameMatcher nameMatcher = null) { Assume.NotNull(selectorFactory, nameof(selectorFactory)); Assume.NotNull(descriptorRepository, nameof(descriptorRepository)); SelectorFactory = selectorFactory; DescriptorRepository = descriptorRepository; NameMatcher = nameMatcher ?? new EqualityNameMatcher(); }
public override void Setup() { base.Setup(); Fixture = new Fixture(); Executor = new DummyExecutor(); CommandCallResolver = new DummyCommandCallResolver(); SelectorFactory = new DefaultSelectorFactory(); SelectorResolver = new DefaultSelectorResolver(SelectorFactory, new FileDescriptorRepository(@"D:\Development\Projects\C#\CodeSharper\master-refactoring\CodeSharper\tests\Configurations\descriptors.json")); UnderTest = new DefaultControlFlowFactory(CommandCallResolver, SelectorResolver, Executor); }
public static ISelectorFactory UseBootstrap(this ISelectorFactory factory) { factory.Prefixes[PrefixNames.Warning].Add(Warning); factory.Prefixes[PrefixNames.Error].Add(Alert); return(factory); }