コード例 #1
0
        public void MapEFToBO()
        {
            var         mapper = new DALContactTypeMapper();
            ContactType entity = new ContactType();

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

            BOContactType response = mapper.MapEFToBO(entity);

            response.ContactTypeID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }
コード例 #2
0
        public void MapEFToBOList()
        {
            var         mapper = new DALContactTypeMapper();
            ContactType entity = new ContactType();

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

            List <BOContactType> response = mapper.MapEFToBO(new List <ContactType>()
            {
                entity
            });

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