mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Builder style
This commit is contained in:
parent
8ee282beec
commit
656beb34ef
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user