ModernUO/Projects/UOContent.Tests/Tests/Engines/Chat/ChatPacketTests.cs
Kamron Batman 60a3a6f501
feat: Splits Server in Core and Application (#1806)
> [!Note]
> **Developer Note**
> Now developers will only need to build/run the Application project instead of everything.
> When adding new projects, make sure to: 
> 1. Add a reference to that project in the Application project.
> 2. Add the dll file to the Distribution/Data/assemblies.json file

### Summary
- Adds an application project
- Consolidates process restarts to use `Core.Kill(true)`
- Removes some old messaging, for example processor optimization
- Fixes missing build cleanup
2024-05-30 23:34:03 -07:00

23 lines
No EOL
714 B
C#

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();
var ns = PacketTestUtilities.CreateTestNetState();
ns.SendChatMessage(lang, number, param1, param2);
var result = ns.SendPipe.Reader.AvailableToRead();
AssertThat.Equal(result, expected);
}
}