Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
granstel committed Aug 28, 2024
1 parent db3f1e2 commit 118265a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
using AutoFixture;
using Dodo1000Bot.Models.Domain;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Moq;
using MySql.Data.MySqlClient;
using NUnit.Framework;

namespace Dodo1000Bot.Services.Tests.Repositories;

public class NotificationsRepositoryTests
{
private ILogger<NotificationsRepository> _logger;
private MySqlConnection _connection;

private NotificationsRepository _target;
Expand All @@ -21,6 +24,7 @@ public class NotificationsRepositoryTests
[SetUp]
public void SetUp()
{
_logger = Mock.Of<ILogger<NotificationsRepository>>();
var connectionString = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddUserSecrets<NotificationsRepositoryTests>()
Expand All @@ -29,7 +33,7 @@ public void SetUp()

_connection = new MySqlConnection(connectionString);

_target = new NotificationsRepository(_connection);
_target = new NotificationsRepository(_logger, _connection);

_fixture = new Fixture { OmitAutoProperties = true };
}
Expand Down

0 comments on commit 118265a

Please sign in to comment.