Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Ghanam committed Nov 29, 2024
1 parent 26728a0 commit 62ee16f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Altinn.Notifications.Core.Models.NotificationTemplate;

/// <summary>
/// Template for an email notification.
/// Represents a template for an email notification.
/// </summary>
public class EmailTemplate : INotificationTemplate
{
Expand Down Expand Up @@ -31,9 +31,9 @@ public class EmailTemplate : INotificationTemplate
/// Gets the type of the notification template.
/// </summary>
/// <value>
/// The type of the notification template, represented by the <see cref="NotificationTemplateType" /> enum.
/// The type of the notification template, represented by the <see cref="NotificationTemplateType"/> enum.
/// </value>
public NotificationTemplateType Type { get; internal set; } = NotificationTemplateType.Email;
public NotificationTemplateType Type { get; } = NotificationTemplateType.Email;

/// <summary>
/// Initializes a new instance of the <see cref="EmailTemplate"/> class with the specified from address, subject, body, and content type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Altinn.Notifications.Core.Models.NotificationTemplate;

/// <summary>
/// Template for an SMS notification.
/// Represents a template for an SMS notification.
/// </summary>
public class SmsTemplate : INotificationTemplate
{
Expand All @@ -21,9 +21,9 @@ public class SmsTemplate : INotificationTemplate
/// Gets the type of the notification template.
/// </summary>
/// <value>
/// The type of the notification template, represented by the <see cref="NotificationTemplateType" /> enum.
/// The type of the notification template, represented by the <see cref="NotificationTemplateType"/> enum.
/// </value>
public NotificationTemplateType Type { get; internal set; } = NotificationTemplateType.Sms;
public NotificationTemplateType Type { get; } = NotificationTemplateType.Sms;

/// <summary>
/// Initializes a new instance of the <see cref="SmsTemplate"/> class with the specified sender number and body.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public static NotificationOrder NotificationOrder_EmailTemplate_OneRecipient()
{
new EmailTemplate()
{
Type = NotificationTemplateType.Email,
FromAddress = "[email protected]",
Subject = "email-subject",
Body = "email-body",
Expand Down Expand Up @@ -105,7 +104,6 @@ public static NotificationOrder NotificationOrder_SmsTemplate_OneRecipient()
{
new SmsTemplate()
{
Type = NotificationTemplateType.Sms,
Body = "sms-body",
SenderNumber = "Altinn local test"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public NotificationOrderTests()
{
new EmailTemplate()
{
Type = NotificationTemplateType.Email,
FromAddress = "[email protected]",
Subject = "email-subject",
Body = "email-body",
Expand Down

0 comments on commit 62ee16f

Please sign in to comment.