Skip to content

Commit 85b1fb9

Browse files
author
Artiom Bozieac
committed
Clean code
1 parent e756cb0 commit 85b1fb9

4 files changed

Lines changed: 6 additions & 10 deletions

File tree

ecommerce-platform-notification-service/src/main/java/com/yashmerino/ecommerce/config/NotificationTemplateConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class NotificationTemplateConfig {
1818

1919
/**
20-
* Implementation of notificaiton templates beans.
20+
* Implementation of notification templates bean.
2121
*
2222
* @param templates the existing templates.
2323
*

ecommerce-platform-notification-service/src/main/resources/application.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,3 @@ spring.mail.properties.mail.smtp.starttls.required=true
3535
spring.mail.properties.mail.smtp.connectiontimeout=5000
3636
spring.mail.properties.mail.smtp.timeout=5000
3737
spring.mail.properties.mail.smtp.writetimeout=5000
38-
39-
# Notification retry configuration
40-
notification.retry.max-attempts=3
41-
notification.retry.initial-delay=1000

ecommerce-platform-notification-service/src/test/java/com/yashmerino/ecommerce/service/NotificationSenderFactoryTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ void testGetSenderEmailTypeReturnsEmailSender() {
3232
NotificationSender sender = factory.getSender("email");
3333

3434
assertNotNull(sender);
35-
assertTrue(sender instanceof EmailNotificationSender);
35+
assertInstanceOf(EmailNotificationSender.class, sender);
3636
}
3737

3838
@Test
3939
void testGetSenderEmailUpperCaseReturnsEmailSender() {
4040
NotificationSender sender = factory.getSender("EMAIL");
4141

4242
assertNotNull(sender);
43-
assertTrue(sender instanceof EmailNotificationSender);
43+
assertInstanceOf(EmailNotificationSender.class, sender);
4444
}
4545

4646
@Test
4747
void testGetSenderEmailMixedCaseReturnsEmailSender() {
4848
NotificationSender sender = factory.getSender("EmAiL");
4949

5050
assertNotNull(sender);
51-
assertTrue(sender instanceof EmailNotificationSender);
51+
assertInstanceOf(EmailNotificationSender.class, sender);
5252
}
5353

5454
@Test

ecommerce-platform-notification-service/src/test/java/com/yashmerino/ecommerce/service/impl/EmailNotificationSenderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void testSendSuccess() throws Exception {
6262
}
6363

6464
@Test
65-
void testSendWithHtmlContent() throws Exception {
65+
void testSendWithHtmlContent() {
6666
String contact = "user@example.com";
6767
NotificationContent content = new NotificationContent(
6868
"HTML Subject",
@@ -95,7 +95,7 @@ void testSendHandlesExceptionGracefully() {
9595
}
9696

9797
@Test
98-
void testSendWithEmptyContent() throws Exception {
98+
void testSendWithEmptyContent() {
9999
String contact = "user@example.com";
100100
NotificationContent content = new NotificationContent("", "");
101101

0 commit comments

Comments
 (0)