public void GetParcelState_ShouldReturnSent_GivenSuccessfulObject() { // Arrange var parcel = new Parcel(); var obj = ProcessorResult.Sent(GetType(), parcel); Attempt <ProcessorResult> attempt = Attempt <ProcessorResult> .Succeed(obj); // Act var(status, result) = attempt.GetParcelState(); // Assert status.Should().Be(ParcelState.Sent); result.Should().BeSameAs(obj); }
public override Attempt <ProcessorResult> Handle(Parcel obj) { return(Attempt <ProcessorResult> .Succeed(ProcessorResult.Sent(GetType(), obj))); }