public void SetUp()
        {
            var taskContext = new JoinableTaskContext();

            mockBreakpointManager = Substitute.For <IBreakpointManager>();
            mockBreakpointRequest = Substitute.For <IDebugBreakpointRequest2>();
            mockTarget            = Substitute.For <RemoteTarget>();
            mockProgram           = Substitute.For <IDebugProgram2>();
            mockMarshal           = Substitute.For <Marshal>();
            mockLldbBreakpoint    = Substitute.For <RemoteBreakpoint>();
            requestInfo           = new BP_REQUEST_INFO();
            mockBreakpointRequest.GetRequestInfo(Arg.Any <enum_BPREQI_FIELDS>(),
                                                 Arg.Any <BP_REQUEST_INFO[]>()).Returns(x =>
            {
                enum_BPREQI_FIELDS fields = (enum_BPREQI_FIELDS)x[0];
                BP_REQUEST_INFO[] breakpointRequestInfo = (BP_REQUEST_INFO[])x[1];
                if (breakpointRequestInfo == null || breakpointRequestInfo.Length == 0)
                {
                    return(1);
                }
                return(BuildBreakpointRequestInfo(fields, out breakpointRequestInfo[0]));
            });
            mockLldbBreakpoint.GetId().Returns(EXPECTED_ID);
            SetBreakpointType(enum_BP_LOCATION_TYPE.BPLT_CODE_FILE_LINE);

            mockBoundBreakpointFactory = Substitute.For <DebugBoundBreakpoint.Factory>();

            debugPendingBreakpointFactory = new DebugPendingBreakpoint.Factory(taskContext,
                                                                               mockBoundBreakpointFactory, new BreakpointErrorEnumFactory(),
                                                                               new BoundBreakpointEnumFactory());

            pendingBreakpoint = debugPendingBreakpointFactory.Create(
                mockBreakpointManager, mockProgram, mockBreakpointRequest, mockTarget,
                mockMarshal);
        }
        public void SetUp()
        {
            taskContext           = new JoinableTaskContext();
            mockBreakpointRequest = Substitute.For <IDebugBreakpointRequest2>();
            mockTarget            = Substitute.For <RemoteTarget>();
            mockProgram           = Substitute.For <IGgpDebugProgram>();
            mockPendingBreakpoint = Substitute.For <IPendingBreakpoint>();
            mockPendingBreakpoint.GetId().Returns(ID);
            mockWatchpoint = Substitute.For <IWatchpoint>();
            mockWatchpoint.GetId().Returns(ID);
            mockPendingBreakpointFactory = Substitute.For <DebugPendingBreakpoint.Factory>();
            mockWatchpointFactory        = Substitute.For <DebugWatchpoint.Factory>();
            var mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>();

            breakpointManager = new LldbBreakpointManager.Factory(taskContext,
                                                                  mockPendingBreakpointFactory, mockWatchpointFactory).Create(mockDebugEngineHandler,
                                                                                                                              mockProgram);

            mockPendingBreakpointFactory.Create(breakpointManager, mockProgram,
                                                mockBreakpointRequest, mockTarget).ReturnsForAnyArgs(mockPendingBreakpoint);
            mockWatchpointFactory.Create(breakpointManager, mockBreakpointRequest, mockTarget,
                                         mockProgram).ReturnsForAnyArgs(mockWatchpoint);
        }