Beispiel #1
0
        public void MapEFToBO()
        {
            var    mapper = new DALPersonMapper();
            Person entity = new Person();

            entity.SetProperties(1, "A");

            BOPerson response = mapper.MapEFToBO(entity);

            response.PersonId.Should().Be(1);
            response.PersonName.Should().Be("A");
        }
Beispiel #2
0
        public void MapBOToEF()
        {
            var mapper = new DALPersonMapper();
            var bo     = new BOPerson();

            bo.SetProperties(1, "A");

            Person response = mapper.MapBOToEF(bo);

            response.PersonId.Should().Be(1);
            response.PersonName.Should().Be("A");
        }
        public void MapEFToBOList()
        {
            var    mapper = new DALPersonMapper();
            Person entity = new Person();

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

            List <BOPerson> response = mapper.MapEFToBO(new List <Person>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
Beispiel #4
0
        public void MapEFToBOList()
        {
            var    mapper = new DALPersonMapper();
            Person entity = new Person();

            entity.SetProperties(1, "A");

            List <BOPerson> response = mapper.MapEFToBO(new List <Person>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
        public void MapEFToBO()
        {
            var    mapper = new DALPersonMapper();
            Person entity = new Person();

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

            BOPerson response = mapper.MapEFToBO(entity);

            response.AdditionalContactInfo.Should().Be("A");
            response.BusinessEntityID.Should().Be(1);
            response.Demographic.Should().Be("A");
            response.EmailPromotion.Should().Be(1);
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.MiddleName.Should().Be("A");
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.NameStyle.Should().Be(true);
            response.PersonType.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.Suffix.Should().Be("A");
            response.Title.Should().Be("A");
        }