This is an automated email from the ASF dual-hosted git repository. Arsnael pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 3e32f1a87cb1e7b340e7508e3ce9650d3668893a Author: Felix Auringer <[email protected]> AuthorDate: Tue Jul 14 17:16:09 2026 +0200 fix: ValidRcptHandlerTest Some tests were not named properly and one test did not test what the name described. --- .../java/org/apache/james/smtpserver/ValidRcptHandlerTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java b/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java index dd0cc8d8bb..ea1fe2ed80 100644 --- a/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java +++ b/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java @@ -134,7 +134,7 @@ class ValidRcptHandlerTest { } @Test - void doRcptShouldRejectNotExistingLocalUsersWhenNoRelay() { + void doRcptShouldDenyNotExistingLocalUsersWhenNoRelay() { SMTPSession session = setupMockedSMTPSession(!RELAYING_ALLOWED); HookReturnCode rCode = handler.doRcpt(session, MAYBE_SENDER, invalidUserEmail).getResult(); @@ -195,13 +195,13 @@ class ValidRcptHandlerTest { SMTPSession session = setupMockedSMTPSession(!RELAYING_ALLOWED); - HookReturnCode rCode = handler.doRcpt(session, MAYBE_SENDER, validUserEmail).getResult(); + HookReturnCode rCode = handler.doRcpt(session, MAYBE_SENDER, user1mail).getResult(); assertThat(rCode).isEqualTo(HookReturnCode.declined()); } @Test - void doRcptShouldDenyWhenHasMappingLoop() throws Exception { + void doRcptShouldDeclineWhenHasMappingLoop() throws Exception { memoryRecipientRewriteTable.addAddressMapping(MappingSource.fromUser(USER1, Domain.LOCALHOST), USER2 + "@domain.tld"); memoryRecipientRewriteTable.addAddressMapping(MappingSource.fromUser(USER2, DOMAIN_1), USER1 + "@domain.tld"); // The loop needs to be created by a domain mapping @@ -226,7 +226,7 @@ class ValidRcptHandlerTest { } @Test - void doRcptShouldReturnDenySoftWhenUsersRepositoryError() throws Exception { + void doRcptShouldDenySoftWhenUsersRepositoryError() throws Exception { SMTPSession session = setupMockedSMTPSession(!RELAYING_ALLOWED); UsersRepository users = mock(UsersRepository.class); @@ -239,7 +239,7 @@ class ValidRcptHandlerTest { } @Test - void doRcptShouldReturnDeclineWhenInvalidUsername() throws Exception { + void doRcptShouldDenyWhenInvalidUsername() throws Exception { SMTPSession session = setupMockedSMTPSession(!RELAYING_ALLOWED); HookReturnCode rCode = handler.doRcpt(session, MAYBE_SENDER, new MailAddress("\"abc@\"@localhost")).getResult(); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
