예제 #1
0
 /// <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;
 }
예제 #2
0
        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;
        }
예제 #3
0
 public WordSourceProvider(TextReaderFactory textReaderFactory, IWordReader textSplitter,
                           IChangerFactory changerFactory,
                           ISelectorFactory selectorFactory)
 {
     this.textReaderFactory = textReaderFactory;
     this.changerFactory    = changerFactory;
     this.selectorFactory   = selectorFactory;
     this.textSplitter      = textSplitter;
 }
예제 #4
0
        /// <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();
        }
        /// <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();
        }
예제 #6
0
 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 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);
 }
예제 #8
0
 public static ISelectorFactory UseBootstrap(this ISelectorFactory factory)
 {
     factory.Prefixes[PrefixNames.Warning].Add(Warning);
     factory.Prefixes[PrefixNames.Error].Add(Alert);
     return(factory);
 }