Skip to content

Commit

Permalink
test corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
Smith authored and Smith committed Feb 10, 2024
1 parent 65631ac commit da798ff
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ public void Update_Success_PropertyOfInterest_UserOverride()
filePropertyRepository.Setup(x => x.GetPropertiesByAcquisitionFileId(It.IsAny<long>())).Returns(acqFile.PimsPropertyAcquisitionFiles.ToList());

var propertyRepository = this._helper.GetService<Mock<IPropertyRepository>>();
propertyRepository.Setup(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()));
propertyRepository.Setup(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()));

var lookupRepository = this._helper.GetService<Mock<ILookupRepository>>();
lookupRepository.Setup(x => x.GetAllRegions()).Returns(new List<PimsRegion>() { new PimsRegion() { Code = 4, RegionName = "Cannot determine" } });
Expand All @@ -677,7 +677,7 @@ public void Update_Success_PropertyOfInterest_UserOverride()

// Assert
repository.Verify(x => x.Update(It.IsAny<PimsAcquisitionFile>()), Times.Once);
propertyRepository.Verify(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()), Times.Once);
propertyRepository.Verify(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()), Times.Once);
}

public static IEnumerable<object[]> takesTestParameters = new List<object[]>() {
Expand Down Expand Up @@ -724,7 +724,7 @@ public void Update_Success_Transfer_MultipleTakes_Core(List<PimsTake> takes, boo
var captureProperty = new PimsProperty();

var propertyRepository = this._helper.GetService<Mock<IPropertyRepository>>();
propertyRepository.Setup(x => x.TransferFileProperty(captureProperty, It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()));
propertyRepository.Setup(x => x.TransferFileProperty(captureProperty, It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>(), It.IsAny<Boolean>()));

var takeRepository = this._helper.GetService<Mock<ITakeRepository>>();
takeRepository.Setup(x => x.GetAllByPropertyAcquisitionFileId(It.IsAny<long>())).Returns(takes);
Expand All @@ -740,7 +740,7 @@ public void Update_Success_Transfer_MultipleTakes_Core(List<PimsTake> takes, boo

// Assert
repository.Verify(x => x.Update(It.IsAny<PimsAcquisitionFile>()), Times.Once);
propertyRepository.Verify(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), isOwned, isPropertyOfInterest, It.IsAny<Boolean>()), Times.Once);
propertyRepository.Verify(x => x.TransferFileProperty(It.IsAny<PimsProperty>(), isOwned, isPropertyOfInterest, It.IsAny<Boolean>(), It.IsAny<Boolean>()), Times.Once);
}

[Fact]
Expand Down

0 comments on commit da798ff

Please sign in to comment.