From: Roland Häder Date: Thu, 11 Aug 2016 10:16:13 +0000 (+0200) Subject: changed some tests (please cherry-pick) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62aa385a5f9fef27fc0c996676df707c1a9e2eff;p=jjobs-ejb.git changed some tests (please cherry-pick) --- diff --git a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java index 804b054..c5a3fc7 100644 --- a/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java +++ b/src/java/org/mxchange/jusercore/model/user/JobsAdminUserSessionBean.java @@ -187,15 +187,15 @@ public class JobsAdminUserSessionBean extends BaseJobsDatabaseBean implements Ad } else if (user.getUserAccountStatus() == null) { // Throw NPE again throw new NullPointerException("user.userAccountStatus is null"); //NOI18N + } else if (!this.userBean.ifUserExists(user)) { + // Name already found + throw new UserNotFoundException(user); } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) { // Account is locked throw new UserStatusLockedException(user); } else if (user.getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) { - // Account is locked + // Account is unconfirmed throw new UserStatusUnconfirmedException(user); - } else if (!this.userBean.ifUserExists(user)) { - // Name already found - throw new UserNotFoundException(user); } else if (null == userLockReason) { // Throw NPE again throw new NullPointerException("userLockReason is null"); //NOI18N @@ -277,15 +277,15 @@ public class JobsAdminUserSessionBean extends BaseJobsDatabaseBean implements Ad } else if (user.getUserAccountStatus() == null) { // Throw NPE again throw new NullPointerException("user.userAccountStatus is null"); //NOI18N + } else if (!this.userBean.ifUserExists(user)) { + // Name already found + throw new UserNotFoundException(user); } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) { - // Account is locked + // Account is confirmed throw new UserStatusConfirmedException(user); } else if (user.getUserAccountStatus() == UserAccountStatus.UNCONFIRMED) { - // Account is locked + // Account is unconfirmed throw new UserStatusUnconfirmedException(user); - } else if (!this.userBean.ifUserExists(user)) { - // Name already found - throw new UserNotFoundException(user); } // Remove contact instance as this is not updated