MobSkillFactory throws exception instead of returning null

This commit is contained in:
P0nk
2022-09-07 19:25:30 +02:00
parent 319d65a0c3
commit df5159e34c
3 changed files with 6 additions and 8 deletions

View File

@@ -61,10 +61,8 @@ class MobSkillFactoryTest {
}
@Test
void shouldReturnNullForNonExistingMobSkill() {
MobSkill mobSkill = MobSkillFactory.getMobSkill(MobSkillType.DEFENSE_UP, 1);
assertNull(mobSkill);
void shouldThrowExceptionOnNonExisting() {
assertThrows(IllegalArgumentException.class, () -> MobSkillFactory.getMobSkill(MobSkillType.DEFENSE_UP, 1));
}
}