Add tests for CashShopSurpriseHandler

This commit is contained in:
P0nk
2024-06-16 13:40:06 +02:00
parent c7b2d218ef
commit 6ab1af99da
11 changed files with 162 additions and 9 deletions

View File

@@ -0,0 +1,24 @@
package testutil;
import client.Character;
import client.Client;
import org.junit.jupiter.api.BeforeEach;
import org.mockito.Mock;
import static org.mockito.Mockito.lenient;
public abstract class HandlerTest {
protected static final int ACCOUNT_ID = 1702;
@Mock
protected Client client;
@Mock
protected Character chr;
@BeforeEach
void prepareClient() {
lenient().when(client.getAccID()).thenReturn(ACCOUNT_ID);
lenient().when(client.getPlayer()).thenReturn(chr);
}
}