public void UpdateLocationsNewLocationsAdded() { MockDocumentPosition(TEST_FILE_NAME, LINE_NUMBER, COLUMN_NUMBER); MockBreakpoint(1); pendingBreakpoint.Bind(); MockBreakpoint(3); pendingBreakpoint.UpdateLocations(); mockBreakpointManager.Received(1).EmitBreakpointBoundEvent( pendingBreakpoint, Arg.Is <IEnumerable <IDebugBoundBreakpoint2> >(a => a.Count() == 2), Arg.Any <BoundBreakpointEnumFactory>()); Assert.That(pendingBreakpoint.EnumBoundBreakpoints(out var boundBreakpoints), Is.EqualTo(VSConstants.S_OK)); Assert.That(boundBreakpoints.GetCount(out uint count), Is.EqualTo(VSConstants.S_OK)); Assert.That(count, Is.EqualTo(3)); // Test that locations are not updated and BreakpointBoundEvent is not emitted, // when locations state hasn't changed and UpdateLocations is executed. mockBreakpointManager.ClearReceivedCalls(); pendingBreakpoint.UpdateLocations(); mockBreakpointManager.DidNotReceive().EmitBreakpointBoundEvent( pendingBreakpoint, Arg.Any <IEnumerable <IDebugBoundBreakpoint2> >(), Arg.Any <BoundBreakpointEnumFactory>()); Assert.That(pendingBreakpoint.EnumBoundBreakpoints(out boundBreakpoints), Is.EqualTo(VSConstants.S_OK)); Assert.That(boundBreakpoints.GetCount(out count), Is.EqualTo(VSConstants.S_OK)); Assert.That(count, Is.EqualTo(3)); }