Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Mar 7, 2021
1 parent b90d601 commit c24db21
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Assets/Tests/Editor/PipeConnectionTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.IO;
using System.Net;
Expand All @@ -23,9 +23,9 @@ public void Setup()
(c1, c2) = PipeConnection.CreatePipe();
}

private static UniTask SendData(IConnection c, byte[] data)
private static void SendData(IConnection c, byte[] data)
{
return c.SendAsync(new ArraySegment<byte>(data));
c.Send(new ArraySegment<byte>(data));
}


Expand All @@ -41,16 +41,16 @@ private static async Task ExpectData(IConnection c, byte[] expected)
[UnityTest]
public IEnumerator TestSendAndReceive() => RunAsync(async () =>
{
await SendData(c1, new byte[] { 1, 2, 3, 4 });
SendData(c1, new byte[] { 1, 2, 3, 4 });
await ExpectData(c2, new byte[] { 1, 2, 3, 4 });
});

[UnityTest]
public IEnumerator TestSendAndReceiveMultiple() => RunAsync(async () =>
{
await SendData(c1, new byte[] { 1, 2, 3, 4 });
await SendData(c1, new byte[] { 5, 6, 7, 8 });
SendData(c1, new byte[] { 1, 2, 3, 4 });
SendData(c1, new byte[] { 5, 6, 7, 8 });
await ExpectData(c2, new byte[] { 1, 2, 3, 4 });
await ExpectData(c2, new byte[] { 5, 6, 7, 8 });
Expand Down

0 comments on commit c24db21

Please sign in to comment.