public void OnBreakPointErrorSendsBreakpointErrorEvent() { var breakpointError = new DebugBreakpointError(null, enum_BP_ERROR_TYPE.BPET_SEV_GENERAL, "oops"); Predicate <DebugEvent> isBreakpointErrorEvent = e => { var be = e as BreakpointErrorEvent; if (be == null) { return(false); } IDebugErrorBreakpoint2 error; be.GetErrorBreakpoint(out error); return(error == breakpointError); }; debugEngineHandler.OnBreakpointError(breakpointError, program); debugEngineHandler.Received(1).SendEvent( Arg.Is <DebugEvent>(e => isBreakpointErrorEvent(e)), program, (IDebugThread2)null); }
public void SetUp() { mockPendingBreakpoint = Substitute.For <IDebugPendingBreakpoint2>(); breakpointError = new DebugBreakpointError(mockPendingBreakpoint, errorType, errorMessage); }