Пример #1
0
 public Types.Commitment.CommitmentAgreement Map(Domain.Entities.CommitmentAgreement commitmentAgreement)
 {
     return(new Types.Commitment.CommitmentAgreement
     {
         Reference = commitmentAgreement.Reference,
         LegalEntityName = commitmentAgreement.LegalEntityName,
         AccountLegalEntityPublicHashedId = commitmentAgreement.AccountLegalEntityPublicHashedId
     });
 }
        public void ThenMappingCompletesSuccessfully()
        {
            const string reference = "COMREF", legalEntityName = "len", aleHash = "alehash";

            var sourceDomainCommitmentAgreement = new Domain.Entities.CommitmentAgreement
            {
                Reference       = reference,
                LegalEntityName = legalEntityName,
                AccountLegalEntityPublicHashedId = aleHash
            };

            var mappedTypesCommitmentAgreement  = _mapper.Map(sourceDomainCommitmentAgreement);

            Assert.AreEqual(reference, mappedTypesCommitmentAgreement.Reference);
            Assert.AreEqual(legalEntityName, mappedTypesCommitmentAgreement.LegalEntityName);
            Assert.AreEqual(aleHash, mappedTypesCommitmentAgreement.AccountLegalEntityPublicHashedId);
        }