/// <summary> /// Check that the object uses the bus to return the appropriate error code. /// </summary> /// <param name="check"></param> /// <returns></returns> public void ExpectReturn(ReturnPredicate check) { Delegate d = new HandleMessageDelegate( () => ExpectCallToReturn(check) ); delegates.Add(d); }
private void ExpectCallToReturn(ReturnPredicate callback) { Expect.Call(() => bus.Return(-1)) .IgnoreArguments() .Callback(callback); }
/// <summary> /// Check that the saga uses the bus to return the appropriate error code. /// </summary> /// <param name="check"></param> /// <returns></returns> public Saga <T> ExpectReturn(ReturnPredicate check) { helper.ExpectReturn(check); return(this); }
/// <summary> /// Check that the saga uses the bus to return the appropriate error code. /// </summary> /// <param name="check"></param> /// <returns></returns> public Handler <T> ExpectReturn(ReturnPredicate check) { helper.ExpectReturn(check); return(this); }