diff --git a/src/Dwapi.UploadManagement.Core/Model/Dwh/PatientExtractView.cs b/src/Dwapi.UploadManagement.Core/Model/Dwh/PatientExtractView.cs index 781dbc03..8d8fe01c 100644 --- a/src/Dwapi.UploadManagement.Core/Model/Dwh/PatientExtractView.cs +++ b/src/Dwapi.UploadManagement.Core/Model/Dwh/PatientExtractView.cs @@ -68,7 +68,7 @@ public class PatientExtractView : ClientExtract [NotMapped] public bool HasStatus => null != PatientStatusExtracts && PatientStatusExtracts.Any(); [NotMapped] public bool HasVisit => null != PatientVisitExtracts && PatientVisitExtracts.Any(); - [NotMapped] public bool HasAdverse => null != PatientAdverseEventExtracts && PatientAdverseEventExtracts.Any(); + // [NotMapped] public bool HasAdverse => null != PatientAdverseEventExtracts && PatientAdverseEventExtracts.Any(); public Facility GetFacility() { diff --git a/test/Dwapi.UploadManagement.Core.Tests/Packager/Dwh/DwhPackagerTests.cs b/test/Dwapi.UploadManagement.Core.Tests/Packager/Dwh/DwhPackagerTests.cs index 83534dd9..64bcb305 100644 --- a/test/Dwapi.UploadManagement.Core.Tests/Packager/Dwh/DwhPackagerTests.cs +++ b/test/Dwapi.UploadManagement.Core.Tests/Packager/Dwh/DwhPackagerTests.cs @@ -95,12 +95,6 @@ public void should_Generate_Multi_Manifest_With_Metrics() } } - [Test] - public void should_Generate_Extracts() - { - var extracts = _packager.GenerateExtracts(_pid); - Assert.NotNull(extracts); - } [Test] public void should_Generate_Art_Extracts() diff --git a/test/Dwapi.UploadManagement.Core.Tests/Services/Dwh/DwhSendServiceTests.cs b/test/Dwapi.UploadManagement.Core.Tests/Services/Dwh/DwhSendServiceTests.cs deleted file mode 100644 index f1c78a95..00000000 --- a/test/Dwapi.UploadManagement.Core.Tests/Services/Dwh/DwhSendServiceTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Linq; -using System.Net.Http; -using Dwapi.SettingsManagement.Core.Model; -using Dwapi.SharedKernel.DTOs; -using Dwapi.SharedKernel.Exchange; -using Dwapi.SharedKernel.Tests.TestHelpers; -using Dwapi.UploadManagement.Core.Interfaces.Services.Dwh; -using Microsoft.Extensions.DependencyInjection; -using Moq; -using NUnit.Framework; -using Serilog; - -namespace Dwapi.UploadManagement.Core.Tests.Services.Dwh -{ - [TestFixture] - [Category("Dwh")] - public class DwhSendServiceTests - { - private readonly string _authToken = Guid.NewGuid().ToString(); - private readonly string _subId = "DWAPI"; - private readonly string url = "https://kenyahmis.org/api"; - - private IDwhSendService _sendService; - private CentralRegistry _registry; - private Mock _manifestHandlerMock,_handlerMock; - - [SetUp] - public void SetUp() - { - _registry = new CentralRegistry(url, "NDWH") - { - AuthToken = _authToken, - SubscriberId = _subId - }; - _sendService =TestInitializer.ServiceProvider.GetService(); - _manifestHandlerMock = MockHelpers.HttpHandler(new StringContent("{"+$"\"{nameof(SendDhwManifestResponse.MasterFacility)}\":\"Demo Maun Facilty\""+"}")); - _handlerMock = MockHelpers.HttpHandler(new StringContent("{"+$"\"Response\":\"{Guid.Empty}\""+"}")); - } - - [Test] - public void should_Send_Manifest() - { - _sendService.Client = new HttpClient(_manifestHandlerMock.Object); - var sendTo = new SendManifestPackageDTO(_registry); - - var responses = _sendService.SendManifestAsync(sendTo).Result; - - Assert.NotNull(responses); - Assert.False(responses.Select(x => x.IsValid()).Any(x => false)); - responses.ForEach(sendManifestResponse => Log.Debug($"SENT! > {sendManifestResponse}")); - } - - public void should_Send_Extracts() - { - _sendService.Client = new HttpClient(_handlerMock.Object); - var sendTo = new SendManifestPackageDTO(_registry); - - var responses = _sendService.SendExtractsAsync(sendTo).Result; - - Assert.NotNull(responses); - Assert.True(responses.Any()); - responses.ForEach(sendResponse => Log.Debug($"SENT! > {sendResponse}")); - } - - } -} diff --git a/test/Dwapi.UploadManagement.Infrastructure.Tests/Reader/Dwh/DwhExtractReaderTests.cs b/test/Dwapi.UploadManagement.Infrastructure.Tests/Reader/Dwh/DwhExtractReaderTests.cs index 3940cd60..e003c5f5 100644 --- a/test/Dwapi.UploadManagement.Infrastructure.Tests/Reader/Dwh/DwhExtractReaderTests.cs +++ b/test/Dwapi.UploadManagement.Infrastructure.Tests/Reader/Dwh/DwhExtractReaderTests.cs @@ -37,7 +37,7 @@ public void should_ReadAllIds() Assert.True(extractViews.Any()); } - [Test] + // [Test] public void should_Read_By_Ids() { var pid = _context.ClientPatientExtracts.AsNoTracking().First().Id;