From 01983abc84553489dd9d73a736abd71ce7eaa0d0 Mon Sep 17 00:00:00 2001 From: devinleighsmith Date: Tue, 31 Oct 2023 13:28:18 -0700 Subject: [PATCH] test corrections. --- .../tests/unit/api/Services/DocumentFileServiceTest.cs | 10 +++++----- .../PropertyActivityDocumentRepositoryTest.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/backend/tests/unit/api/Services/DocumentFileServiceTest.cs b/source/backend/tests/unit/api/Services/DocumentFileServiceTest.cs index d0684e7aa8..7625f2aa26 100644 --- a/source/backend/tests/unit/api/Services/DocumentFileServiceTest.cs +++ b/source/backend/tests/unit/api/Services/DocumentFileServiceTest.cs @@ -100,13 +100,13 @@ public void GetPimsDocumentTypes_PropertyActivity_Success() var service = this.CreateDocumentFileServiceWithPermissions(Permissions.DocumentView, Permissions.ManagementView); var propertyActivityFileDocumentRepository = this._helper.GetService>(); - propertyActivityFileDocumentRepository.Setup(x => x.GetAllByPropertyActivityFile(It.IsAny())).Returns(new List()); + propertyActivityFileDocumentRepository.Setup(x => x.GetAllByPropertyActivity(It.IsAny())).Returns(new List()); // Act var sut = service.GetFileDocuments(Constants.FileType.Management, 1); // Assert - propertyActivityFileDocumentRepository.Verify(x => x.GetAllByPropertyActivityFile(It.IsAny()), Times.Once); + propertyActivityFileDocumentRepository.Verify(x => x.GetAllByPropertyActivity(It.IsAny()), Times.Once); } [Fact] @@ -164,13 +164,13 @@ public void GetAllDocuments_PropertyActivity_Success() var service = this.CreateDocumentFileServiceWithPermissions(Permissions.DocumentView, Permissions.ManagementView); var propertyActivityDocumentRepository = this._helper.GetService>(); - propertyActivityDocumentRepository.Setup(x => x.GetAllByPropertyActivityFile(It.IsAny())).Returns(new List()); + propertyActivityDocumentRepository.Setup(x => x.GetAllByPropertyActivity(It.IsAny())).Returns(new List()); // Act var sut = service.GetFileDocuments(Constants.FileType.Management, 1); // Assert - propertyActivityDocumentRepository.Verify(x => x.GetAllByPropertyActivityFile(It.IsAny()), Times.Once); + propertyActivityDocumentRepository.Verify(x => x.GetAllByPropertyActivity(It.IsAny()), Times.Once); } [Fact] @@ -566,7 +566,7 @@ public async void DeleteDocumentPropertyActivity_Success_NoResults_Status_NotFou var documentService = this._helper.GetService>(); var propertyActivityDocumentRepository = this._helper.GetService>(); - propertyActivityDocumentRepository.Setup(x => x.GetAllByPropertyActivityFile(It.IsAny())).Returns(new List()); + propertyActivityDocumentRepository.Setup(x => x.GetAllByPropertyActivity(It.IsAny())).Returns(new List()); documentService.Setup(x => x.DeleteDocumentAsync(It.IsAny())) .ReturnsAsync(new ExternalResult() { diff --git a/source/backend/tests/unit/dal/Repositories/PropertyActivityDocumentRepositoryTest.cs b/source/backend/tests/unit/dal/Repositories/PropertyActivityDocumentRepositoryTest.cs index 7532dd47e5..cf2f7ab287 100644 --- a/source/backend/tests/unit/dal/Repositories/PropertyActivityDocumentRepositoryTest.cs +++ b/source/backend/tests/unit/dal/Repositories/PropertyActivityDocumentRepositoryTest.cs @@ -47,7 +47,7 @@ public void GetAllByPropertyActivity_Success() var repository = helper.CreateRepository(user); // Act - var result = repository.GetAllByPropertyActivityFile(propertyActivityFileDocument.PimsPropertyActivityId); + var result = repository.GetAllByPropertyActivity(propertyActivityFileDocument.PimsPropertyActivityId); // Assert result.FirstOrDefault().Internal_Id.Should().Be(1);