public async Task valid_Person_with_sourceIdentifier_should_be_processed_correctly() { var result = await _sut.ProcessPersonFound(_fakePerson, _providerProfile, _searchRequest, Guid.NewGuid(), _fakeToken, _fakeSourceIdentifier); _searchRequestServiceMock .Verify(x => x.SavePerson(It.IsAny <PersonEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateIdentifier(It.IsAny <IdentifierEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateAddress(It.IsAny <AddressEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreatePhoneNumber(It.IsAny <PhoneNumberEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateName(It.IsAny <AliasEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateRelatedPerson(It.IsAny <RelatedPersonEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateEmployment(It.IsAny <EmploymentEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateEmploymentContact(It.IsAny <EmploymentContactEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateBankInfo(It.IsAny <BankingInformationEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateVehicle(It.IsAny <VehicleEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(2)); _searchRequestServiceMock .Verify(x => x.CreateOtherAsset(It.IsAny <AssetOtherEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateAssetOwner(It.IsAny <SSG_AssetOwner>(), It.IsAny <CancellationToken>()), Times.Exactly(2)); _searchRequestServiceMock .Verify(x => x.CreateCompensationClaim(It.IsAny <CompensationClaimEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateInsuranceClaim(It.IsAny <ICBCClaimEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateInvolvedParty(It.IsAny <SSG_InvolvedParty>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateSimplePhoneNumber(It.IsAny <SSG_SimplePhoneNumber>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateTransaction(It.IsAny <SSG_SearchRequestResultTransaction>(), It.IsAny <CancellationToken>()), Times.Exactly(13)); Assert.AreEqual(true, result); }
public async Task valid_Person_should_be_processed_correctly() { var result = await _sut.ProcessPersonFound(_fakePerson, _providerProfile, _searchRequest, _fakeToken); _searchRequestServiceMock .Verify(x => x.SavePerson(It.IsAny <PersonEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateIdentifier(It.IsAny <SSG_Identifier>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateAddress(It.IsAny <SSG_Address>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreatePhoneNumber(It.IsAny <SSG_PhoneNumber>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateName(It.IsAny <SSG_Aliase>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateRelatedPerson(It.IsAny <SSG_Identity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateEmployment(It.IsAny <EmploymentEntity>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateEmploymentContact(It.IsAny <SSG_EmploymentContact>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateBankInfo(It.IsAny <SSG_Asset_BankingInformation>(), It.IsAny <CancellationToken>()), Times.Once); _searchRequestServiceMock .Verify(x => x.CreateVehicle(It.IsAny <VehicleEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(2)); _searchRequestServiceMock .Verify(x => x.CreateOtherAsset(It.IsAny <AssetOtherEntity>(), It.IsAny <CancellationToken>()), Times.Exactly(1)); _searchRequestServiceMock .Verify(x => x.CreateAssetOwner(It.IsAny <SSG_AssetOwner>(), It.IsAny <CancellationToken>()), Times.Exactly(2)); Assert.AreEqual(true, result); }