Skip to content

Commit

Permalink
Review changes #633
Browse files Browse the repository at this point in the history
- fixed typo in emum
  • Loading branch information
de-jcup committed Feb 21, 2022
1 parent daa5005 commit 33654fb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.mercedesbenz.sechub.integrationtest.api;

public enum TextSearchMode {

/**
* Results only accepted when inspected text is exactly the same as search
* string.
Expand All @@ -17,5 +18,6 @@ public enum TextSearchMode {
* Results are accepted when the given search regular expression matches with
* inspected text
*/
REGLAR_EXPRESSON,
REGULAR_EXPRESSON,

}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public MockEmailEntry findMailOrFail(String email, String subjectSearch, TextSea
found = message;
}
break;
case REGLAR_EXPRESSON:
case REGULAR_EXPRESSON:
if (message.subject.matches(subjectSearch)) {
found = message;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ public MockEmailEntry findMailOrFail(String email, String subjectSearch, TextSea
case EXACT:
sb.append("(exact)");
break;
case REGLAR_EXPRESSON:
case REGULAR_EXPRESSON:
sb.append("(regexp)");
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void superadmin_can_grant_user_admin_rights_mails_are_sent_and_user_appea
isInSuperAdminList();
/* test notifications */
assertUser(userBecomingAdmin).hasReceivedEmail("SecHub administrator privileges granted");
assertMailExists("int-test_superadmins_npm@example.org", "SecHub: Granted administrator rights.*" + userBecomingAdmin.getUserId(), TextSearchMode.REGLAR_EXPRESSON);
assertMailExists("int-test_superadmins_npm@example.org", "SecHub: Granted administrator rights.*" + userBecomingAdmin.getUserId(), TextSearchMode.REGULAR_EXPRESSON);
}
/* @formatter:on */

Expand Down Expand Up @@ -122,7 +122,7 @@ public void superadmin_can_revoke_user_admin_rights() {
/* test notifications */
assertUser(userNoMoreAdmin).hasReceivedEmail("SecHub administrator privileges revoked");
assertMailExists("int-test_superadmins_npm@example.org",
"SecHub: Revoked administrator rights.*" + userNoMoreAdmin.getUserId(), TextSearchMode.REGLAR_EXPRESSON);
"SecHub: Revoked administrator rights.*" + userNoMoreAdmin.getUserId(), TextSearchMode.REGULAR_EXPRESSON);
}
/* @formatter:on */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public void when_a_superadmin_assigns_another_owner_to_a_project_all_associated_
assertUser(USER_3).isAssignedToProject(PROJECT_1);
assertUser(USER_1).isNotOwnerOf(PROJECT_1);

assertUser(USER_3).hasReceivedEmail(subject, TextSearchMode.REGLAR_EXPRESSON);
assertUser(USER_2).hasReceivedEmail(subject, TextSearchMode.REGLAR_EXPRESSON);
assertUser(USER_1).hasReceivedEmail(subject, TextSearchMode.REGLAR_EXPRESSON);
assertUser(USER_3).hasReceivedEmail(subject, TextSearchMode.REGULAR_EXPRESSON);
assertUser(USER_2).hasReceivedEmail(subject, TextSearchMode.REGULAR_EXPRESSON);
assertUser(USER_1).hasReceivedEmail(subject, TextSearchMode.REGULAR_EXPRESSON);
}
}

0 comments on commit 33654fb

Please sign in to comment.