-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making FailureAcknowledgement be self serializable. Closes GH-768
- Loading branch information
1 parent
004f916
commit 3bccc46
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/Testing/CoreTests/Runtime/RemoteInvocation/FailureAcknowledgementTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Wolverine.Runtime.RemoteInvocation; | ||
using Xunit; | ||
|
||
namespace CoreTests.Runtime.RemoteInvocation; | ||
|
||
public class FailureAcknowledgementTests | ||
{ | ||
[Fact] | ||
public void serialize_FailureAcknowledgement() | ||
{ | ||
var ack = new FailureAcknowledgement | ||
{ | ||
Message = "Bad", | ||
RequestId = Guid.NewGuid() | ||
}; | ||
|
||
var bytes = ack.Write(); | ||
|
||
var ack2 = (FailureAcknowledgement)FailureAcknowledgement.Read(bytes); | ||
|
||
ack2.Message.ShouldBe(ack.Message); | ||
ack2.RequestId.ShouldBe(ack.RequestId); | ||
|
||
} | ||
} |
22 changes: 21 additions & 1 deletion
22
src/Wolverine/Runtime/RemoteInvocation/FailureAcknowledgement.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters