Skip to content

Commit

Permalink
Debug coap packet metadata in mock endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
NZSmartie committed Dec 19, 2017
1 parent f6883b6 commit 570a29e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/CoAPNet.Tests/Mocks/MockEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void Dispose()

public virtual Task SendAsync(CoapPacket packet)
{
Debug.WriteLine($"Writing packet {{{string.Join(", ", packet.Payload)}}}");
Debug.WriteLine($"Writing packet {{{string.Join(", ", packet.Payload)}}} {CoapMessage.CreateFromBytes(packet.Payload)}");
return IsDisposed
? throw new CoapEndpointException("Encdpoint Disposed")
: MockSendAsync(packet);
Expand All @@ -58,7 +58,7 @@ public void EnqueueReceivePacket(CoapPacket packet)
{
lock (_receiveQueue)
{
Debug.WriteLine($"MockEndpoint: Enqueing packet {{{string.Join(", ", packet.Payload)}}}");
Debug.WriteLine($"MockEndpoint: Enqueing packet {{{string.Join(", ", packet.Payload)}}} {CoapMessage.CreateFromBytes(packet.Payload)}");
_receiveQueue.Enqueue(packet);
}
_receiveEnqueuedEvent.Set();
Expand Down

0 comments on commit 570a29e

Please sign in to comment.