inventory_mock tests #17

Merged
erns6604 merged 16 commits from inventory_mocks into main 2025-10-30 07:52:55 +01:00
Showing only changes of commit c207766e0d - Show all commits

View File

@@ -82,6 +82,17 @@ class PlayerTest {
verify(mockAction, times(1)).execute(p); verify(mockAction, times(1)).execute(p);
} }
@Test
void miner_can_dig_multiple_times() {
var p = new Player("John");
p.learnJob(new Miner(p));
var mockAction = mock(DigAction.class);
for(int i = 0; i < 10; i++) {
p.performAction(mockAction);
}
verify(mockAction, times(10)).execute(p);
}
@Test @Test
void wizard_can_learn_spell() { void wizard_can_learn_spell() {
var p = new Player("Bob"); var p = new Player("Bob");