Exemplo n.º 1
0
        public void SetUp()
        {
            var callInvokerFactory = new PipeCallInvokerFactory();

            mainThreadContext = new FakeMainThreadContext();
            taskContext       = mainThreadContext.JoinableTaskContext;
            connection        = new GrpcConnection(taskContext.Factory, callInvokerFactory.Create());
        }
Exemplo n.º 2
0
        public async Task SetUpAsync()
        {
            _mainThreadContext = new FakeMainThreadContext();
            _taskFactory       = _mainThreadContext.JoinableTaskContext.Factory;

            await _taskFactory.SwitchToMainThreadAsync();

            _taskExecutor = new TaskExecutor(_taskFactory);
            _taskExecutor.StartAsyncTasks(null);
        }
        public void SetUp()
        {
            _mockSbListener         = Substitute.For <SbListener>();
            _mockSbProcess          = Substitute.For <SbProcess>();
            _mockSbEvent            = Substitute.For <SbEvent>();
            _mockRemoteThread       = Substitute.For <RemoteThread>();
            _mockBreakpointManager  = Substitute.For <IBreakpointManager>();
            _mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>();

            _mockPendingBreakpoint1 = Substitute.For <IPendingBreakpoint>();
            _mockPendingBreakpoint2 = Substitute.For <IPendingBreakpoint>();
            _mockBoundBreakpoint1   = Substitute.For <IBoundBreakpoint>();
            _mockBoundBreakpoint2   = Substitute.For <IBoundBreakpoint>();
            _mockBoundBreakpoint3   = Substitute.For <IBoundBreakpoint>();
            _mockWatchpoint         = Substitute.For <IWatchpoint>();
            _mockProgram            = Substitute.For <IGgpDebugProgram>();

            MockEvent(EventType.STATE_CHANGED, StateType.STOPPED, false);
            MockListener(_mockSbEvent, true);
            MockThread(_mockRemoteThread, StopReason.BREAKPOINT, _breakpointStopData);
            MockProcess(new List <RemoteThread> {
                _mockRemoteThread
            });
            MockBreakpointManager();

            _mockListenerSubscriber = Substitute.For <LldbListenerSubscriber>(_mockSbListener);

            var threadContext = new FakeMainThreadContext();

            _eventManager =
                new LldbEventManager
                .Factory(new BoundBreakpointEnumFactory(), threadContext.JoinableTaskContext)
                .Create(_mockDebugEngineHandler, _mockBreakpointManager, _mockProgram,
                        _mockSbProcess, _mockListenerSubscriber);

            var lldbEventManager = _eventManager as LldbEventManager;

            lldbEventManager?.SubscribeToChanges();
        }
        public void Setup()
        {
            var mainThreadContext = new FakeMainThreadContext();

            taskContext = mainThreadContext.JoinableTaskContext;
        }
 public void SetUp()
 {
     mainThreadContext = new FakeMainThreadContext();
     taskContext       = mainThreadContext.JoinableTaskContext;
     taskFactory       = taskContext.Factory;
 }