ModernUO/Projects/UOContent.Tests/Misc/HexStringConverterTest.cs
Kamron Batman c3289a20ab
Changes damage packets (#299)
- [X] Changes damage packets

Bumps release version
2020-11-01 22:44:23 -08:00

19 lines
560 B
C#

using System;
using Xunit;
namespace Server.Tests.Accounting
{
public class HexStringConverterTest
{
[Theory]
[InlineData("ABCDEF1234", new byte[] { 0xAB, 0xCD, 0xEF, 0x12, 0x34 })]
public void ConvertsProperly(string input, byte[] bytes)
{
Span<byte> outputBytes = stackalloc byte[input.Length / 2];
HexStringConverter.GetBytes(input, outputBytes);
Assert.Equal(bytes, outputBytes.ToArray());
Assert.Equal(input, HexStringConverter.GetString(bytes));
}
}
}