diff --git a/tests/Aetheria.Shared.Tests/ContactRevealTests.cs b/tests/Aetheria.Shared.Tests/ContactRevealTests.cs index 1a8df874c..b7d1b88ab 100644 --- a/tests/Aetheria.Shared.Tests/ContactRevealTests.cs +++ b/tests/Aetheria.Shared.Tests/ContactRevealTests.cs @@ -354,6 +354,7 @@ public sealed partial class ContactRevealTests : IDisposable capacitor.AddCharge(1000f); ship.SetTarget(TargetRef.None); gun.Activate(); + gun.Deactivate(); for (var i = 0; i < 10; i++) { Tick(.1f); @@ -1277,6 +1278,7 @@ public sealed partial class ContactRevealTests : IDisposable ((InputCapacitor) typeof(InstantWeapon).GetField("_capacitor", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(killerGun)).AddCharge(1000f); killer.SetTarget(TargetRef.None); killerGun.Activate(); + killerGun.Deactivate(); for (var ticks = 0; !killed && ticks < 20; ticks++) Tick(.1f); Assert.True(killed, "fixture: the kill lands inside a tick"); Assert.False(_zone.Entities.Contains(e), "fixture: the kill took the subject out of the zone"); diff --git a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs index 189867e41..4b7b7027b 100644 --- a/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlPerWeaponTests.cs @@ -1052,6 +1052,7 @@ public sealed class FireControlPerWeaponTests : IDisposable var weapon = (InstantWeapon) r.Gun.Weapon; r.Zone.Update(.25f); weapon.Activate(); + weapon.Deactivate(); r.Zone.Update(.25f); Assert.False(weapon.CanFire, "control: the first burst fired and is cooling"); for (var i = 0; i < 10 && !weapon.CanFire; i++) r.Zone.Update(.25f); diff --git a/tests/Aetheria.Shared.Tests/MineTests.cs b/tests/Aetheria.Shared.Tests/MineTests.cs index ccc397c2c..c3c395f6f 100644 --- a/tests/Aetheria.Shared.Tests/MineTests.cs +++ b/tests/Aetheria.Shared.Tests/MineTests.cs @@ -168,6 +168,7 @@ public sealed class MineTests : IDisposable { var before = lab.Zone.Mines.Count; lab.Weapon.Activate(); + lab.Weapon.Deactivate(); lab.Zone.Update(dt); Assert.Equal(before + 1, lab.Zone.Mines.Count); return lab.Zone.Mines.Last(); @@ -532,6 +533,7 @@ public sealed class MineTests : IDisposable foreach (var lab in new[] { a, b }) { lab.Weapon.Activate(); + lab.Weapon.Deactivate(); lab.Zone.Update(.1f); lab.Zone.Update(.1f); } @@ -803,6 +805,7 @@ public sealed class MineTests : IDisposable lab.Zone.Log = log.Add; lab.Weapon.Activate(); + lab.Weapon.Deactivate(); lab.Zone.Update(.1f); Assert.Empty(lab.Zone.Mines); diff --git a/tests/Aetheria.Shared.Tests/SignatureTests.cs b/tests/Aetheria.Shared.Tests/SignatureTests.cs index 922e3e5b5..fb1755d96 100644 --- a/tests/Aetheria.Shared.Tests/SignatureTests.cs +++ b/tests/Aetheria.Shared.Tests/SignatureTests.cs @@ -172,6 +172,7 @@ public sealed class SignatureTests : IDisposable } r.Ship.SetTarget(TargetRef.None); r.Weapon.Activate(); + r.Weapon.Deactivate(); for (var i = 0; i < 5; i++) r.Zone.Update(.1f); }