modernuo/Projects/Server.Tests/Helpers/AssertExtensions.cs
Kamron Batman 211c2ba8ee
fix(core): Streamlines text encoding (#407)
- [X] Streamlines text encoding
2021-01-13 18:56:32 -08:00

15 lines
493 B
C#

using System;
using Server.Text;
namespace Server.Tests
{
public static class AssertThat
{
// TODO: Swap actual and expected to match Assert
public static void Equal(ReadOnlySpan<byte> actual, ReadOnlySpan<byte> expected) =>
Xunit.Assert.True(
expected.SequenceEqual(actual),
$"Expected does not match actual.\nExpected:\t{expected.ToDelimitedHexString()}\nActual:\t\t{actual.ToDelimitedHexString()}"
);
}
}