refactor(AutoMapperTests): add ILoggerFactory to Mapper configuration for improved logging
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
using Shop.Query.Profiles;
|
using Shop.Query.Profiles;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
using Xunit.Categories;
|
using Xunit.Categories;
|
||||||
@@ -13,7 +14,9 @@ public class AutoMapperTests
|
|||||||
public void Should_Mapper_ConfigurationIsValid()
|
public void Should_Mapper_ConfigurationIsValid()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var mapper = new Mapper(new MapperConfiguration(cfg => cfg.AddProfile<EventToQueryModelProfile>()));
|
var loggerFactory = NSubstitute.Substitute.For<ILoggerFactory>();
|
||||||
|
|
||||||
|
var mapper = new Mapper(new MapperConfiguration(cfg => cfg.AddProfile<EventToQueryModelProfile>(), loggerFactory));
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
// REF: https://fluentassertions.com/exceptions/
|
// REF: https://fluentassertions.com/exceptions/
|
||||||
|
|||||||
Reference in New Issue
Block a user