-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRetrievePDSDemographicTests.cs
More file actions
48 lines (42 loc) · 1.8 KB
/
RetrievePDSDemographicTests.cs
File metadata and controls
48 lines (42 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
namespace NHS.CohortManager.Tests.UnitTests.DemographicServicesTests;
using System.Net;
using Common;
using Common.Interfaces;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Model;
using Moq;
using NHS.CohortManager.DemographicServices;
using DataServices.Client;
using NHS.CohortManager.Tests.TestUtils;
using System.Linq.Expressions;
using Microsoft.Extensions.Caching.Memory;
using System.ComponentModel;
[TestClass]
public class RetrievePdsDemographicTests : DatabaseTestBaseSetup<RetrievePdsDemographic>
{
private static readonly Mock<IHttpClientFunction> _mockHttpClientFunction = new();
private static readonly Mock<IOptions<RetrievePDSDemographicConfig>> _mockConfig = new();
private static readonly Mock<IFhirPatientDemographicMapper> _mockFhirPatientDemographicMapper = new();
private static readonly Mock<IDataServiceClient<ParticipantDemographic>> _mockParticipantDemographicClient = new();
private static readonly Mock<ICreateBasicParticipantData> _mockCreateBasicParticipantService = new();
private static readonly Mock<IAddBatchToQueue> _mockAddBatchToQueue = new();
private static Mock<IBearerTokenService> _bearerTokenService = new();
private const string _validNhsNumber = "3112728165";
private const long _validNhsNumberLong = 3112728165;
public RetrievePdsDemographicTests() : base((conn, logger, transaction, command, response) =>
new RetrievePdsDemographic(
logger,
response,
_mockHttpClientFunction.Object,
_mockFhirPatientDemographicMapper.Object,
_mockConfig.Object,
_mockParticipantDemographicClient.Object,
_mockCreateBasicParticipantService.Object,
_mockAddBatchToQueue.Object,
_bearerTokenService.Object
))
{
CreateHttpResponseMock();
}
}