mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-23 23:55:33 +02:00
Update FlatFile for new skill cds
This commit is contained in:
@@ -31,7 +31,6 @@ import java.util.logging.Logger;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
//This class uses JUnit5/Jupiter
|
||||
class FlatFileDatabaseManagerTest {
|
||||
|
||||
public static final @NotNull String TEST_FILE_NAME = "test.mcmmo.users";
|
||||
@@ -39,7 +38,7 @@ class FlatFileDatabaseManagerTest {
|
||||
public static final @NotNull String BAD_DATA_FILE_LINE_TWENTY_THREE = "nossr51:baddata:::baddata:baddata:640:baddata:1000:1000:1000:baddata:baddata:baddata:baddata:16:0:500:20273:0:0:0:0::1000:0:0:baddata:1593543012:0:0:0:0::1000:0:0:baddata:IGNORED:1000:0:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1:0:";
|
||||
public static final @NotNull String DB_BADDATA = "baddatadb.users";
|
||||
public static final @NotNull String DB_HEALTHY = "healthydb.users";
|
||||
public static final @NotNull String HEALTHY_DB_LINE_1 = "nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:140:14:150:15:1111:2222:";
|
||||
public static final @NotNull String HEALTHY_DB_LINE_1 = "nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:140:14:150:15:1111:2222:3333";
|
||||
public static final @NotNull String HEALTHY_DB_LINE_ONE_UUID_STR = "588fe472-1c82-4c4e-9aa1-7eefccb277e3";
|
||||
public static final String DB_MISSING_LAST_LOGIN = "missinglastlogin.users";
|
||||
public static final String LINE_TWO_FROM_MISSING_DB = "nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:0:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:";
|
||||
@@ -64,7 +63,7 @@ class FlatFileDatabaseManagerTest {
|
||||
long expectedBerserkCd = 111, expectedGigaDrillBreakerCd = 222, expectedTreeFellerCd = 333,
|
||||
expectedGreenTerraCd = 444, expectedSerratedStrikesCd = 555, expectedSkullSplitterCd = 666,
|
||||
expectedSuperBreakerCd = 777, expectedBlastMiningCd = 888, expectedChimaeraWingCd = 999,
|
||||
expectedSuperShotgunCd = 1111, expectedTridentSuperCd = 2222;
|
||||
expectedSuperShotgunCd = 1111, expectedTridentSuperCd = 2222, expectedExplosiveShotCd = 3333;
|
||||
|
||||
int expectedScoreboardTips = 1111;
|
||||
Long expectedLastLogin = 2020L;
|
||||
@@ -473,31 +472,22 @@ class FlatFileDatabaseManagerTest {
|
||||
}
|
||||
|
||||
private long getExpectedSuperAbilityDATS(@NotNull SuperAbilityType superAbilityType) {
|
||||
switch(superAbilityType) {
|
||||
case BERSERK:
|
||||
return expectedBerserkCd;
|
||||
case SUPER_BREAKER:
|
||||
return expectedSuperBreakerCd;
|
||||
case GIGA_DRILL_BREAKER:
|
||||
return expectedGigaDrillBreakerCd;
|
||||
case GREEN_TERRA:
|
||||
return expectedGreenTerraCd;
|
||||
case SKULL_SPLITTER:
|
||||
return expectedSkullSplitterCd;
|
||||
case SUPER_SHOTGUN:
|
||||
return expectedSuperShotgunCd;
|
||||
case TREE_FELLER:
|
||||
return expectedTreeFellerCd;
|
||||
case SERRATED_STRIKES:
|
||||
return expectedSerratedStrikesCd;
|
||||
case BLAST_MINING:
|
||||
return expectedBlastMiningCd;
|
||||
case TRIDENTS_SUPER_ABILITY:
|
||||
return expectedTridentSuperCd;
|
||||
}
|
||||
return switch (superAbilityType) {
|
||||
case BERSERK -> expectedBerserkCd;
|
||||
case SUPER_BREAKER -> expectedSuperBreakerCd;
|
||||
case GIGA_DRILL_BREAKER -> expectedGigaDrillBreakerCd;
|
||||
case GREEN_TERRA -> expectedGreenTerraCd;
|
||||
case SKULL_SPLITTER -> expectedSkullSplitterCd;
|
||||
case SUPER_SHOTGUN -> expectedSuperShotgunCd;
|
||||
case TREE_FELLER -> expectedTreeFellerCd;
|
||||
case SERRATED_STRIKES -> expectedSerratedStrikesCd;
|
||||
case BLAST_MINING -> expectedBlastMiningCd;
|
||||
case TRIDENTS_SUPER_ABILITY -> expectedTridentSuperCd;
|
||||
case EXPLOSIVE_SHOT -> expectedExplosiveShotCd;
|
||||
default -> throw new RuntimeException("Values not defined for super ability please add " +
|
||||
"values for " + superAbilityType.toString() + " to the test");
|
||||
};
|
||||
|
||||
throw new RuntimeException("Values not defined for super ability not defined please add " +
|
||||
"values for " + superAbilityType.toString() + " to the test");
|
||||
}
|
||||
|
||||
private float getExpectedExperienceHealthyDBEntryOne(@NotNull PrimarySkillType primarySkillType) {
|
||||
|
@@ -1,3 +1,3 @@
|
||||
nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:140:14:150:15:1111:2222:
|
||||
mrfloris:2420:::0:2452:0:1983:1937:1790:3042:1138:3102:2408:3411:0:0:0:0:0:0:0:0::642:0:1617583171:0:1617165043:0:1617583004:1617563189:1616785408::2184:0:0:1617852413:HEARTS:415:0:631e3896-da2a-4077-974b-d047859d76bc:5:1600906906:3030:0:0:0:0:0:0:
|
||||
powerless:0:::0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0::0:0:0:0:0:0:0:0:0::0:0:0:1337:HEARTS:0:0:e0d07db8-f7e8-43c7-9ded-864dfc6f3b7c:5:1600906906:4040:0:0:0:0:0:0:
|
||||
nossr50:1:IGNORED:IGNORED:10:2:20:3:4:5:6:7:8:9:10:30:40:50:60:70:80:90:100:IGNORED:11:110:111:222:333:444:555:666:777:IGNORED:12:120:888:IGNORED:HEARTS:13:130:588fe472-1c82-4c4e-9aa1-7eefccb277e3:1111:999:2020:140:14:150:15:1111:2222:3333:
|
||||
mrfloris:2420:::0:2452:0:1983:1937:1790:3042:1138:3102:2408:3411:0:0:0:0:0:0:0:0::642:0:1617583171:0:1617165043:0:1617583004:1617563189:1616785408::2184:0:0:1617852413:HEARTS:415:0:631e3896-da2a-4077-974b-d047859d76bc:5:1600906906:3030:0:0:0:0:0:0:0:
|
||||
powerless:0:::0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0::0:0:0:0:0:0:0:0:0::0:0:0:1337:HEARTS:0:0:e0d07db8-f7e8-43c7-9ded-864dfc6f3b7c:5:1600906906:4040:0:0:0:0:0:0:0:
|
Reference in New Issue
Block a user