> [!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
37 lines
No EOL
999 B
C#
37 lines
No EOL
999 B
C#
using Server.Items;
|
|
using Server.Tests;
|
|
using Server.Tests.Network;
|
|
using Xunit;
|
|
|
|
namespace UOContent.Tests;
|
|
|
|
public class WeaponAbilityPacketTests
|
|
{
|
|
[Theory]
|
|
[InlineData(0, true)]
|
|
[InlineData(0, false)]
|
|
[InlineData(100, true)]
|
|
[InlineData(1000, false)]
|
|
public void TestSpecialAbility(int abilityId, bool active)
|
|
{
|
|
var expected = new ToggleSpecialAbility(abilityId, active).Compile();
|
|
|
|
var ns = PacketTestUtilities.CreateTestNetState();
|
|
ns.SendToggleSpecialAbility(abilityId, active);
|
|
|
|
var result = ns.SendPipe.Reader.AvailableToRead();
|
|
AssertThat.Equal(result, expected);
|
|
}
|
|
|
|
[Fact]
|
|
public void TestClearAbility()
|
|
{
|
|
var expected = new ClearWeaponAbility().Compile();
|
|
|
|
var ns = PacketTestUtilities.CreateTestNetState();
|
|
ns.SendClearWeaponAbility();
|
|
|
|
var result = ns.SendPipe.Reader.AvailableToRead();
|
|
AssertThat.Equal(result, expected);
|
|
}
|
|
} |