Ejemplo n.º 1
0
        protected EyesBase(IServerConnectorFactory serverConnectorFactory)
        {
            ServerConnectorFactory = serverConnectorFactory;

            Logger = new Logger();

            //EnsureConfiguration_();

            ServerConnector = ServerConnectorFactory.CreateNewServerConnector(Logger);
            runningSession_ = null;
            UserInputs      = new List <Trigger>();

            properties_ = new PropertiesCollection();

            setScaleProvider_ = provider => { scaleProvider_ = provider; };
            scaleProvider_    = NullScaleProvider.Instance;
            cutProvider_      = NullCutProvider.Instance;

            StackTrace stackTrace = new StackTrace();

            StackFrame[] stackFrames = stackTrace.GetFrames();
            foreach (StackFrame stackFrame in stackFrames)
            {
                Type callingType = stackFrame.GetMethod().DeclaringType;
                if (callingType.IsAbstract)
                {
                    continue;
                }
                actualAssembly_ = callingType.Assembly;
                break;
            }
        }
Ejemplo n.º 2
0
 internal ClassicRunner(ILogHandler logHandler, IServerConnectorFactory serverConnectorFactory)
 {
     ArgumentGuard.NotNull(serverConnectorFactory, nameof(serverConnectorFactory));
     Logger.SetLogHandler(logHandler);
     ServerConnectorFactory = serverConnectorFactory;
     ServerConnector        = ServerConnectorFactory.CreateNewServerConnector(Logger, new Uri(ServerUrl));
     openService_           = new OpenService(Logger, ServerConnector, 1);
     checkService_          = new CheckService(Logger, ServerConnector);
     closeService_          = new CloseService(Logger, ServerConnector);
 }
Ejemplo n.º 3
0
 public VisualGridRunner(RunnerOptions runnerOptions, string suiteName,
                         IServerConnectorFactory serverConnectorFactory, ILogHandler logHandler = null)
 {
     ServerConnectorFactory = serverConnectorFactory;
     ServerConnector        = serverConnectorFactory.CreateNewServerConnector(Logger, new Uri("https://some.url.com"));
     runnerOptions_         = runnerOptions;
     testConcurrency_       = new TestConcurrency(((IRunnerOptionsInternal)runnerOptions).GetConcurrency(), false);
     if (logHandler != null)
     {
         Logger.SetLogHandler(logHandler);
     }
     Init(suiteName);
 }
Ejemplo n.º 4
0
 protected EyesBase(IServerConnectorFactory serverConnectorFactory, ClassicRunner runner, Logger logger)
 {
     Init_(runner, logger);
     ServerConnectorFactory = serverConnectorFactory;
     if (runner_.ServerConnector != null)
     {
         ServerConnector = runner_.ServerConnector;
     }
     else
     {
         ServerConnector         = ServerConnectorFactory.CreateNewServerConnector(Logger);
         runner_.ServerConnector = ServerConnector;
     }
 }