コード例 #1
0
        public void MapEFToBOList()
        {
            var     mapper = new DALRetweetMapper();
            Retweet entity = new Retweet();

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

            List <BORetweet> response = mapper.MapEFToBO(new List <Retweet>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
コード例 #2
0
        public void MapEFToBO()
        {
            var     mapper = new DALRetweetMapper();
            Retweet entity = new Retweet();

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

            BORetweet response = mapper.MapEFToBO(entity);

            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.RetwitterUserId.Should().Be(1);
            response.Time.Should().Be(TimeSpan.Parse("0"));
            response.TweetTweetId.Should().Be(1);
        }
コード例 #3
0
        public void MapBOToEF()
        {
            var mapper = new DALRetweetMapper();
            var bo     = new BORetweet();

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

            Retweet response = mapper.MapBOToEF(bo);

            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.RetwitterUserId.Should().Be(1);
            response.Time.Should().Be(TimeSpan.Parse("0"));
            response.TweetTweetId.Should().Be(1);
        }