ModernUO/Projects/Server.Tests/Tests/Network/Packets/Utilities/PacketTestUtilities.cs
Kamron Batman 3551d962f7
C# 9 Cleanup (#325)
- [X] Removes EventArgs - not needed
- [X] Merges sequential checks
- [X] Removes redundant type declarations
2020-11-27 00:29:21 -08:00

14 lines
342 B
C#

using System;
using Server.Network;
namespace Server.Tests.Network
{
public static class PacketTestUtilities
{
public static Span<byte> Compile(this Packet p) =>
p.Compile(false, out var length).AsSpan(0, length);
public static NetState CreateTestNetState() =>
new(new MockSocket());
}
}