fix bug: couldn't convert package
This commit is contained in:
@@ -111,12 +111,12 @@ public class UDPServerTest
|
||||
|
||||
foreach (var number in bytesArray)
|
||||
{
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, NumberProcessor.NumberToBytes(number, 4).Value));
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, Number.NumberToBytes(number, 4).Value));
|
||||
var ret = await udpServer.FindDataAsync(address);
|
||||
Assert.True(ret.HasValue);
|
||||
var data = ret.Value;
|
||||
Assert.Equal(address, data.Address);
|
||||
Assert.Equal(number, NumberProcessor.BytesToNumber(data.Data));
|
||||
Assert.Equal(number, Number.BytesToNumber(data.Data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,13 +130,13 @@ public class UDPServerTest
|
||||
|
||||
foreach (var number in bytesArray)
|
||||
{
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, NumberProcessor.NumberToBytes(number, 4).Value));
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, Number.NumberToBytes(number, 4).Value));
|
||||
|
||||
var ret = await udpServer.WaitForAckAsync(address);
|
||||
Assert.True(ret.IsSuccessful);
|
||||
var data = ret.Value;
|
||||
Assert.True(data.IsSuccessful);
|
||||
Assert.Equal(number, NumberProcessor.BytesToNumber(data.ToBytes()));
|
||||
Assert.Equal(number, Number.BytesToNumber(data.ToBytes()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,13 +150,13 @@ public class UDPServerTest
|
||||
|
||||
foreach (var number in bytesArray)
|
||||
{
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, NumberProcessor.NumberToBytes(number, 8).Value));
|
||||
Assert.True(await UDPClientPool.SendBytesAsync(serverEP, Number.NumberToBytes(number, 8).Value));
|
||||
|
||||
var ret = await udpServer.WaitForDataAsync(address);
|
||||
Assert.True(ret.IsSuccessful);
|
||||
var data = ret.Value;
|
||||
Assert.True(data.IsSuccessful);
|
||||
Assert.Equal(number, NumberProcessor.BytesToNumber(data.ToBytes()));
|
||||
Assert.Equal(number, Number.BytesToNumber(data.ToBytes()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user