first commit
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
schema_version: 1
|
||||
module_path: tests
|
||||
title: Unit, Integration & UI Test Suites
|
||||
scope:
|
||||
- ClassicAssist.Tests/
|
||||
- ClassicAssist.UITest/
|
||||
- UITest/
|
||||
source_files: []
|
||||
depends_on: []
|
||||
related_to: []
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Three sibling test projects share the same MSTest (1.4.0) + Microsoft.NET.Test.Sdk (16.4.0) stack but serve different scopes:
|
||||
- `ClassicAssist.Tests` targets `net48` with `AllowUnsafeBlocks` and references `ClassicAssist.Shared`, `cuoapi.dll`, and `WindowsBase`; it is organized by feature area (`Agents/`, `Filters/`, `MacroCommands/`) with one `[TestClass]` per subsystem, using `[TestInitialize]` to seed a `PlayerMobile` into `Engine.Player` before exercising command handlers via `IncomingPacketHandlers.Initialize()` / `OutgoingPacketHandlers.Initialize()` and feeding raw byte arrays through `PacketReader`.
|
||||
- `ClassicAssist.UITest` is a WinForms-style `STAThread` entry point that loads `AssistantOptions`, constructs `MainWindow`, and owns the message loop — used for manual visual regression of Avalonia views.
|
||||
- `UITest` is an empty console project kept as a placeholder.
|
||||
Dependency direction is one-way: tests depend on production assemblies (`ClassicAssist.Shared`, `ClassicAssist.Data.*`, `ClassicAssist.UO.*`, `ClassicAssist.UI.Views`); no production code references any test project. A disabled `ReplayPacketLog` class demonstrates the intended pattern for replaying captured packet logs against the live handler pipeline.
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
- 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 a `PlayerMobile` and assign it to `Engine.Player` before invoking command or agent code.
|
||||
- Network-layer tests wire up the handler registry first (`IncomingPacketHandlers.Initialize()` / `OutgoingPacketHandlers.Initialize()`) then feed hand-crafted `byte[]` payloads wrapped in `new PacketReader(data, data.Length, ...)` to `handler?.OnReceive(...)`.
|
||||
- Assertions are written with `Microsoft.VisualStudio.TestTools.UnitTesting.Assert.*` (e.g. `Assert.AreEqual`, `Assert.IsTrue`) rather than a third-party assertion library.
|
||||
+1
@@ -0,0 +1 @@
|
||||
MSTest-based unit and integration tests for ClassicAssist core logic plus two standalone .NET Framework UI bootstrap projects used to manually exercise Avalonia windows.
|
||||
+1
@@ -0,0 +1 @@
|
||||
MSTest v1.4.0 + Microsoft.NET.Test.Sdk 16.4.0 targeting .NET Framework 4.8 (x64); tests consume the shared `cuoapi.dll` binary reference from `ClassicAssist.Shared`.
|
||||
Reference in New Issue
Block a user