Exemplo n.º 1
0
        public virtual PhoneNumberType MapBOToEF(
            BOPhoneNumberType bo)
        {
            PhoneNumberType efPhoneNumberType = new PhoneNumberType();

            efPhoneNumberType.SetProperties(
                bo.ModifiedDate,
                bo.Name,
                bo.PhoneNumberTypeID);
            return(efPhoneNumberType);
        }
        public void MapEFToBO()
        {
            var             mapper = new DALPhoneNumberTypeMapper();
            PhoneNumberType entity = new PhoneNumberType();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1);

            BOPhoneNumberType response = mapper.MapEFToBO(entity);

            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.PhoneNumberTypeID.Should().Be(1);
        }
        public void MapEFToBOList()
        {
            var             mapper = new DALPhoneNumberTypeMapper();
            PhoneNumberType entity = new PhoneNumberType();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", 1);

            List <BOPhoneNumberType> response = mapper.MapEFToBO(new List <PhoneNumberType>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }