Builder style

This commit is contained in:
nossr50 2023-07-30 16:25:58 -07:00
parent 8ee282beec
commit 656beb34ef

View File

@ -94,8 +94,9 @@ class LevelUpCommandTest extends MMOTestEnvironmentBasic {
private LevelUpCommand buildLevelUpCommand(String commandStr, Set<Integer> levels, Set<PrimarySkillType> skillFilter) { private LevelUpCommand buildLevelUpCommand(String commandStr, Set<Integer> levels, Set<PrimarySkillType> skillFilter) {
LevelUpCommand.LevelUpCommandBuilder builder = new LevelUpCommand.LevelUpCommandBuilder(); LevelUpCommand.LevelUpCommandBuilder builder = new LevelUpCommand.LevelUpCommandBuilder();
builder.commandString(commandStr); builder.commandString(commandStr)
builder.withLevels(levels); .withLevels(levels)
.withLogInfo(true);
if (skillFilter != null) { if (skillFilter != null) {
builder.withSkillFilter(skillFilter); builder.withSkillFilter(skillFilter);
} }
@ -105,9 +106,9 @@ class LevelUpCommandTest extends MMOTestEnvironmentBasic {
private LevelUpCommand buildLevelUpCommand(String commandStr, BiPredicate<PrimarySkillType, Integer> predicate) { private LevelUpCommand buildLevelUpCommand(String commandStr, BiPredicate<PrimarySkillType, Integer> predicate) {
LevelUpCommand.LevelUpCommandBuilder builder = new LevelUpCommand.LevelUpCommandBuilder(); LevelUpCommand.LevelUpCommandBuilder builder = new LevelUpCommand.LevelUpCommandBuilder();
builder.commandString(commandStr); builder.commandString(commandStr)
builder.withPredicate(predicate); .withPredicate(predicate)
builder.withLogInfo(true); .withLogInfo(true);
return Mockito.spy(builder.build()); return Mockito.spy(builder.build());
} }
} }