ModernUO/Projects/UOContent.Tests/Tests/Engines/Help/TestHelpTopicPacket.cs
Kamron Batman 1e4c32c809
fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316)
### Summary
* Exempts localhost from IPLimiter
* Updates tests to have proper sequential testing with packets
* Updates tests to clean up NetState
2026-01-20 08:54:15 -08:00

25 lines
686 B
C#

using Server.Engines.Help;
using Server.Network;
using Server.Tests;
using Server.Tests.Network;
using Xunit;
namespace UOContent.Tests;
[Collection("Sequential 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.AvailableToRead();
AssertThat.Equal(result, expected);
}
}