fix(core): Converts help topic packet (#403)

- [X] Converts help topic packet
This commit is contained in:
Kamron Batman 2021-01-12 18:59:16 -08:00 committed by GitHub
parent ca196e4729
commit 4bb2be4574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 104 additions and 18 deletions

View file

@ -0,0 +1,26 @@
using System;
using Server.Engines.Help;
using Server.Network;
using Server.Tests;
using Server.Tests.Network;
using Xunit;
namespace UOContent.Tests
{
public class TestHelpTopicPacket
{
[Theory]
[InlineData(HelpTopic.Healing, false)]
[InlineData(HelpTopic.EmptyingBowl, true)]
public void TestDisplayHelpTopic(int topic, bool display)
{
var expected = new DisplayHelpTopic(topic, display).Compile();
using var ns = PacketTestUtilities.CreateTestNetState();
ns.SendDisplayHelpTopic(topic, display);
var result = ns.SendPipe.Reader.TryRead();
AssertThat.Equal(result.Buffer[0].AsSpan(0), expected);
}
}
}