예제 #1
0
        public void MapEntityToModelList()
        {
            var      mapper = new DALFollowerMapper();
            Follower item   = new Follower();

            item.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, "A", "A");
            List <ApiFollowerServerResponseModel> response = mapper.MapEntityToModel(new List <Follower>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }
예제 #2
0
        public void MapEntityToModel()
        {
            var      mapper = new DALFollowerMapper();
            Follower item   = new Follower();

            item.SetProperties(1, "A", DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, "A", "A");
            ApiFollowerServerResponseModel response = mapper.MapEntityToModel(item);

            response.Blocked.Should().Be("A");
            response.DateFollowed.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.FollowedUserId.Should().Be(1);
            response.FollowingUserId.Should().Be(1);
            response.FollowRequestStatu.Should().Be("A");
            response.Id.Should().Be(1);
            response.Muted.Should().Be("A");
        }