inventory_mock tests #17
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user