- [X] Adds a stop music packet - [X] Converts chat packets - [X] Breaks out chat code a little bit more - [X] Converts character statue animation packet - [X] Renames some folders to have spaces - [X] Organizes and consolidates incoming/outgoing packets for other content - [X] Fixes virtual checks
25 lines
789 B
C#
25 lines
789 B
C#
using System;
|
|
using Server.Engines.Chat;
|
|
using Server.Tests;
|
|
using Server.Tests.Network;
|
|
using Xunit;
|
|
|
|
namespace UOContent.Tests
|
|
{
|
|
public class ChatPacketTests
|
|
{
|
|
[Theory]
|
|
[InlineData(null, 100, "some param", "some other param")]
|
|
[InlineData("ENU", 200, "a third param", "another param")]
|
|
public void TestSendChatMessage(string lang, int number, string param1, string param2)
|
|
{
|
|
var expected = new ChatMessagePacket(lang, number, param1, param2).Compile();
|
|
|
|
using var ns = PacketTestUtilities.CreateTestNetState();
|
|
ns.SendChatMessage(lang, number, param1, param2);
|
|
|
|
var result = ns.SendPipe.Reader.TryRead();
|
|
AssertThat.Equal(result.Buffer[0].AsSpan(0), expected);
|
|
}
|
|
}
|
|
}
|