fix(core): Converts help topic packet (#403)
- [X] Converts help topic packet
This commit is contained in:
parent
ca196e4729
commit
4bb2be4574
8 changed files with 104 additions and 18 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue