Fixing build

This commit is contained in:
Kenny Bastani
2017-01-03 13:59:24 -05:00
parent 7c3e33b733
commit 7644f5beba
2 changed files with 3 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import org.springframework.util.Assert;
import java.util.function.Consumer;
import static demo.account.domain.AccountStatus.ACCOUNT_CONFIRMED;
import static demo.account.domain.AccountStatus.ACCOUNT_PENDING;
/**
@@ -24,6 +25,7 @@ public class ConfirmAccount extends Action<Account> {
public Consumer<Account> getConsumer() {
return (account) -> {
Assert.isTrue(account.getStatus() != ACCOUNT_CONFIRMED, "The account has already been confirmed");
Assert.isTrue(account.getStatus() == ACCOUNT_PENDING, "The account has already been confirmed");
AccountService accountService = account.getModule(AccountModule.class)

View File

@@ -25,7 +25,7 @@ public class SuspendAccount extends Action<Account> {
public Consumer<Account> getConsumer() {
return (account) -> {
Assert.isTrue(account.getStatus() == ACCOUNT_SUSPENDED, "The account is already suspended");
Assert.isTrue(account.getStatus() != ACCOUNT_SUSPENDED, "The account is already suspended");
Assert.isTrue(account.getStatus() == ACCOUNT_ACTIVE, "An inactive account cannot be suspended");
AccountService accountService = account.getModule(AccountModule.class)