public void RegisterBreakpointWithLocations(int id, uint locations)
        {
            IPendingBreakpoint pendingBreakpoint = Substitute.For <IPendingBreakpoint>();

            pendingBreakpoint.GetId().Returns(id);
            pendingBreakpoint.GetNumLocations().Returns(locations);
            breakpointManager.RegisterPendingBreakpoint(pendingBreakpoint);
        }
        public void GetNumLocations()
        {
            int numLocations = 8;

            // Set a function breakpoint type and create a new pending breakpoint.
            SetBreakpointType(enum_BP_LOCATION_TYPE.BPLT_CODE_FUNC_OFFSET);
            pendingBreakpoint = debugPendingBreakpointFactory.Create(
                mockBreakpointManager, mockProgram, mockBreakpointRequest, mockTarget,
                mockMarshal);

            MockFunctionBreakpoint(numLocations);
            MockFunctionPosition(TEST_FUNCTION_NAME);

            var result = pendingBreakpoint.Bind();
            IDebugErrorBreakpoint2 breakpointError = GetBreakpointError();

            Assert.AreEqual(null, breakpointError);
            Assert.AreEqual(VSConstants.S_OK, result);
            Assert.AreEqual(numLocations, pendingBreakpoint.GetNumLocations());
        }
 public void GetNumLocationsNoBreakpoint()
 {
     Assert.AreEqual(0, pendingBreakpoint.GetNumLocations());
 }