コード例 #1
0
        public NodeTestExecutionProvider(IProcessHelper process, IFileProbe fileProbe,
                                         IUrlBuilder urlBuilder, ITestCaseStreamReaderFactory readerFactory)
        {
            this.processTools = process;
            this.fileProbe    = fileProbe;
            this.urlBuilder   = urlBuilder;

            var path = Path.Combine("Node", Environment.Is64BitProcess ? "x64" : "x86", HeadlessBrowserName);

            this.headlessBrowserPath = fileProbe.FindFilePath(path);

            if (path == null)
            {
                throw new FileNotFoundException("Unable to find node: " + path);
            }

            this.readerFactory = readerFactory;

            isRunningElevated = process.IsRunningElevated();
        }