40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
using Xunit;
|
|
using Moq;
|
|
using LCU.API.Collections.RepoApi.HostedServices;
|
|
using LCU.API.Collections.RepoApi.Configuration;
|
|
using LCU.Shared.Realtime.QueueLib.Models;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace LCU.API.Collections.RepoApiTests.HostedServices
|
|
{
|
|
public class RepoQueueConsumerServiceTest
|
|
{
|
|
private RepoApiConfiguration _repoApiConfig;
|
|
private Mock<IQueueConnectionConfig> _mockQueueConnectionConfig;
|
|
private RepoQueueConsumerService _repoQueueConsumerService;
|
|
private Mock<IServiceScopeFactory> _mockScopeFactory;
|
|
|
|
public RepoQueueConsumerServiceTest()
|
|
{
|
|
_repoApiConfig = new RepoApiConfiguration()
|
|
{
|
|
QueueConsumerConfigs = StaticTestConfigs.GetQueueConsumerConfigs()
|
|
};
|
|
_mockQueueConnectionConfig = new Mock<IQueueConnectionConfig>();
|
|
_mockScopeFactory = new Mock<IServiceScopeFactory>();
|
|
_repoQueueConsumerService = new RepoQueueConsumerService(_mockQueueConnectionConfig.Object, _repoApiConfig, _mockScopeFactory.Object );
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
public void BasicConstruction()
|
|
{
|
|
Assert.NotNull(_repoQueueConsumerService);
|
|
}
|
|
|
|
|
|
}
|
|
}
|