diff --git a/source/core/src/test/com/csse3200/game/entities/factories/ProjectileFactoryTest.java b/source/core/src/test/com/csse3200/game/entities/factories/ProjectileFactoryTest.java index b1e4969d1..1065562d4 100644 --- a/source/core/src/test/com/csse3200/game/entities/factories/ProjectileFactoryTest.java +++ b/source/core/src/test/com/csse3200/game/entities/factories/ProjectileFactoryTest.java @@ -45,7 +45,8 @@ class ProjectileFactoryTest { "images/projectiles/engineer_projectile.atlas", "images/projectiles/stun_effect.atlas", "images/projectiles/burn_effect.atlas", - "images/projectiles/snow_ball.atlas" + "images/projectiles/snow_ball.atlas", + "images/projectiles/firework_anim.atlas" }; private final String[] animations = { @@ -272,5 +273,27 @@ public void testSlowProjectileAnimationController() { assertNotNull(slowProjectile.getComponent(SnowBallProjectileAnimationController.class), "Slow Projectile does not have Animation Controller"); } + + @Test + public void testFireworkProjectileCreation() { + Entity fireworkProjectile = ProjectileFactory.createFireworks( + PhysicsLayer.TOWER, new Vector2(0.1f, 0.1f), new Vector2(1f, 1f)); + assertNotNull(fireworkProjectile, "fireworkProjectile is null"); + } + + @Test + public void testFireworkProjectileAnimationRenderComponent() { + Entity fireworkProjectile = ProjectileFactory.createFireworks( + PhysicsLayer.TOWER, new Vector2(0.1f, 0.1f), new Vector2(1f, 1f)); + assertNotNull(fireworkProjectile.getComponent(AnimationRenderComponent.class), + "Slow Projectile does not have AnimationRenderComponent"); + } + @Test + public void testFireworkProjectileAnimationController() { + Entity fireworkProjectile = ProjectileFactory.createFireworks( + PhysicsLayer.TOWER, new Vector2(0.1f, 0.1f), new Vector2(1f, 1f)); + assertNotNull(fireworkProjectile.getComponent(FireworkAnimationController.class), + "Slow Projectile does not have Animation Controller"); + } }