-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added comments to MobAttackTask and created MobAttackTaskTest
Tests still need to be implemented.
- Loading branch information
1 parent
df15f8f
commit 81802a1
Showing
2 changed files
with
81 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
source/core/src/test/com/csse3200/game/components/tasks/MobAttackTaskTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.csse3200.game.components.tasks; | ||
|
||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.verify; | ||
|
||
import com.csse3200.game.ai.tasks.AITaskComponent; | ||
import com.csse3200.game.entities.Entity; | ||
import com.csse3200.game.events.listeners.EventListener0; | ||
import com.csse3200.game.extensions.GameExtension; | ||
import com.csse3200.game.utils.math.Vector2Utils; | ||
import com.csse3200.game.physics.components.PhysicsMovementComponent; | ||
import com.csse3200.game.services.GameTime; | ||
import com.csse3200.game.services.ServiceLocator; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
|
||
@ExtendWith(GameExtension.class) | ||
@ExtendWith(MockitoExtension.class) | ||
class MobAttackTaskTest { | ||
@Mock | ||
GameTime gameTime; | ||
|
||
// @BeforeEach | ||
// void beforeEach() { | ||
// ServiceLocator.registerTimeSource(gameTime); | ||
// // To Do | ||
// } | ||
// | ||
// @Test | ||
// void shouldShootProjectile() { | ||
// Entity target = new Entity(); | ||
// target.setPosition(2f, 2f); | ||
// | ||
// AITaskComponent ai = new AITaskComponent().addTask(new MobAttackTask(target, 10, 5, 10)); | ||
// Entity entity = makePhysicsEntity().addComponent(ai); | ||
// entity.create(); | ||
// entity.setPosition(0f, 0f); | ||
// | ||
// // To Do | ||
// } | ||
} |