예제 #1
0
        public void MapEFToBO()
        {
            var       mapper = new DALFollowingMapper();
            Following entity = new Following();

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

            BOFollowing response = mapper.MapEFToBO(entity);

            response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Muted.Should().Be("A");
            response.UserId.Should().Be("A");
        }
예제 #2
0
        public void MapBOToEF()
        {
            var mapper = new DALFollowingMapper();
            var bo     = new BOFollowing();

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

            Following response = mapper.MapBOToEF(bo);

            response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Muted.Should().Be("A");
            response.UserId.Should().Be("A");
        }
예제 #3
0
        public void MapEFToBOList()
        {
            var       mapper = new DALFollowingMapper();
            Following entity = new Following();

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

            List <BOFollowing> response = mapper.MapEFToBO(new List <Following>()
            {
                entity
            });

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