741 B
741 B
- Each test file declares a single
[TestClass]whose name mirrors the subsystem under test (e.g.BuyAgentTests,AliasCommandTests,ClilocFilterTests). - Per-test fixture setup uses
[TestInitialize]to create aPlayerMobileand assign it toEngine.Playerbefore invoking command or agent code. - Network-layer tests wire up the handler registry first (
IncomingPacketHandlers.Initialize()/OutgoingPacketHandlers.Initialize()) then feed hand-craftedbyte[]payloads wrapped innew PacketReader(data, data.Length, ...)tohandler?.OnReceive(...). - Assertions are written with
Microsoft.VisualStudio.TestTools.UnitTesting.Assert.*(e.g.Assert.AreEqual,Assert.IsTrue) rather than a third-party assertion library.