refactoring

This commit is contained in:
nossr50
2024-05-24 13:07:45 -07:00
parent 4277384c22
commit 6c1502fc67
3 changed files with 29 additions and 13 deletions

View File

@@ -17,6 +17,9 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import java.util.Collections;
import java.util.List;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
@@ -68,7 +71,8 @@ class WoodcuttingTest extends MMOTestEnvironment {
// wire block
Mockito.when(blockState.getBlock()).thenReturn(block);
Mockito.when(blockState.getBlock().getDrops(any())).thenReturn(null);
// return empty collection if ItemStack
Mockito.when(blockState.getBlock().getDrops(any())).thenReturn(Collections.EMPTY_LIST);
Mockito.when(blockState.getType()).thenReturn(Material.OAK_LOG);
woodcuttingManager.processBonusDropCheck(blockState);