using CounterDrone.Core.Algorithms; using Xunit; namespace CounterDrone.Core.Tests { public class AlgorithmFactoryTests { [Fact] public void Create_ReturnsDefaultImplementations() { var dispersion = AlgorithmFactory.Create(); Assert.IsType(dispersion); var damage = AlgorithmFactory.Create(); Assert.IsType(damage); } [Fact] public void Register_ReplacesImplementation() { AlgorithmFactory.Register(() => new MockDispersion()); var instance = AlgorithmFactory.Create(); Assert.IsType(instance); AlgorithmFactory.Register(() => new GaussianPuffDispersion()); } } public class MockDispersion : ICloudDispersionModel { public Vector3 Center => new(); public float Radius => 100f; public float CoreDensity => 1f; public float EffectiveRadius => 100f; public ParticleParams Particles => new(); public bool IsDissipated => false; public int Phase => 2; public float Elapsed => 10f; public void Initialize(CounterDrone.Core.Models.AmmunitionSpec ammo, CounterDrone.Core.Models.CombatScene env, Vector3 releasePos, float releaseTime) { } public void Tick(float deltaTime, float windSpeed, CounterDrone.Core.Models.WindDirection windDir) { } } }