Skip to content

Commit

Permalink
tests: implement code base for unit tests of devices controller
Browse files Browse the repository at this point in the history
  • Loading branch information
leynier committed May 19, 2022
1 parent a9ab2c3 commit 4992f20
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Gateways.Api.Tests/Controllers/DevicesControllerTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using AutoMapper;
using Gateways.Api.Controllers;
using Gateways.Api.Tests;
using Gateways.Business.Contracts.Services;
using Microsoft.Extensions.Configuration;
using Moq;

namespace Devices.Api.Tests.Controllers;

public class DevicesControllerTests
{
private readonly IConfiguration config;
private readonly Mock<IDeviceService> deviceService;
private readonly IMapper mapper;

public DevicesControllerTests()
{
config = new ConfigurationBuilder().Build();
deviceService = new Mock<IDeviceService>();
mapper = AutoMapperFactory.CreateMapper();
}

private DevicesController Controller => new(deviceService.Object, mapper, config);
}

0 comments on commit 4992f20

Please sign in to comment.