Пример #1
0
        public void MapEFToBOList()
        {
            var          mapper = new DALEmailAddressMapper();
            EmailAddress entity = new EmailAddress();

            entity.SetProperties(1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));

            List <BOEmailAddress> response = mapper.MapEFToBO(new List <EmailAddress>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Пример #2
0
        public void MapEFToBO()
        {
            var          mapper = new DALEmailAddressMapper();
            EmailAddress entity = new EmailAddress();

            entity.SetProperties(1, "A", 1, DateTime.Parse("1/1/1987 12:00:00 AM"), Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));

            BOEmailAddress response = mapper.MapEFToBO(entity);

            response.BusinessEntityID.Should().Be(1);
            response.EmailAddress1.Should().Be("A");
            response.EmailAddressID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
        }