Skip to content

Commit

Permalink
Match sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
bbarber committed Jan 2, 2025
1 parent d38a93d commit fdf32bb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
// Database
services.AddTransient<IDatabaseContextFactory, DatabaseContextFactory>();

// Utilities / SDKs
// Utilities / Sdks
services.AddScoped<IContextUtility, ContextUtility>();
services.AddTransient<IBlobStorageSdk, BlobStorageSdk>();
services.AddTransient<IEmailNotificationSdk, EmailNotificationSdk>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ namespace WesternStatesWater.WestDaat.Managers
{
public sealed class NotificationManager : ManagerBase, INotificationManager
{
private readonly IEmailNotificationSdk _emailSDK;
private readonly IEmailNotificationSdk _emailSdk;
private readonly EmailServiceConfiguration _emailConfig;

public NotificationManager(
EmailServiceConfiguration emailService,
IEmailNotificationSdk emailSDK,
IEmailNotificationSdk emailSdk,
IManagerRequestHandlerResolver resolver,
IValidationEngine validationEngine,
ILogger<NotificationManager> logger
) : base(resolver, validationEngine, logger)
{
_emailConfig = emailService;
_emailSDK = emailSDK;
_emailSdk = emailSdk;
}

async Task INotificationManager.SendFeedback(FeedbackRequest request)
Expand All @@ -40,7 +40,7 @@ async Task INotificationManager.SendFeedback(FeedbackRequest request)
To = _emailConfig.FeedbackTo,
};

await _emailSDK.SendEmail(msg);
await _emailSdk.SendEmail(msg);
}

private string FeedbackTextContent(FeedbackRequest request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace WesternStatesWater.WestDaat.Tests.ManagerTests
[TestClass]
public class NotificationManagerTests : ManagerTestBase
{
private readonly Mock<IEmailNotificationSdk> _emailNotificationSDK = new(MockBehavior.Strict);
private readonly Mock<IEmailNotificationSdk> _emailNotificationSdk = new(MockBehavior.Strict);
private INotificationManager Manager { get; set; }
private EmailServiceConfiguration EmailConfig { get; set; }

Expand Down Expand Up @@ -39,7 +39,7 @@ public void SendFeedback_Success()

CommonDTO.EmailRequest emailRequest = null;

_emailNotificationSDK.Setup(a => a.SendEmail(It.IsAny<CommonDTO.EmailRequest>()))
_emailNotificationSdk.Setup(a => a.SendEmail(It.IsAny<CommonDTO.EmailRequest>()))
.Callback<CommonDTO.EmailRequest>((request) => { emailRequest = request; });

Manager.SendFeedback(feedbackRequest);
Expand Down Expand Up @@ -68,7 +68,7 @@ private INotificationManager CreateNotificationManager()
{
return new NotificationManager(
Configuration.GetSmtpConfiguration(),
_emailNotificationSDK.Object,
_emailNotificationSdk.Object,
ManagerRequestHandlerResolverMock.Object,
ValidationEngineMock.Object,
CreateLogger<NotificationManager>()
Expand Down

0 comments on commit fdf32bb

Please sign in to comment.