public void MapEFToBO() { var mapper = new DALTransactionMapper(); Transaction entity = new Transaction(); entity.SetProperties(1m, "A", 1, 1); BOTransaction response = mapper.MapEFToBO(entity); response.Amount.Should().Be(1m); response.GatewayConfirmationNumber.Should().Be("A"); response.Id.Should().Be(1); response.TransactionStatusId.Should().Be(1); }
public void MapEFToBOList() { var mapper = new DALTransactionMapper(); Transaction entity = new Transaction(); entity.SetProperties(1m, "A", 1, 1); List <BOTransaction> response = mapper.MapEFToBO(new List <Transaction>() { entity }); response.Count.Should().Be(1); }
public void MapBOToEF() { var mapper = new DALTransactionMapper(); var bo = new BOTransaction(); bo.SetProperties(1, 1m, "A", 1); Transaction response = mapper.MapBOToEF(bo); response.Amount.Should().Be(1m); response.GatewayConfirmationNumber.Should().Be("A"); response.Id.Should().Be(1); response.TransactionStatusId.Should().Be(1); }