Exemplo n.º 1
0
        public void MapBOToModelList()
        {
            var    mapper = new BOLVoteMapper();
            BOVote bo     = new BOVote();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);
            List <ApiVoteResponseModel> response = mapper.MapBOToModel(new List <BOVote>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Exemplo n.º 2
0
        public void MapModelToBO()
        {
            var mapper = new BOLVoteMapper();
            ApiVoteRequestModel model = new ApiVoteRequestModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);
            BOVote response = mapper.MapModelToBO(1, model);

            response.BountyAmount.Should().Be(1);
            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.PostId.Should().Be(1);
            response.UserId.Should().Be(1);
            response.VoteTypeId.Should().Be(1);
        }
Exemplo n.º 3
0
        public void MapBOToModel()
        {
            var    mapper = new BOLVoteMapper();
            BOVote bo     = new BOVote();

            bo.SetProperties(1, 1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, 1, 1);
            ApiVoteResponseModel response = mapper.MapBOToModel(bo);

            response.BountyAmount.Should().Be(1);
            response.CreationDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Id.Should().Be(1);
            response.PostId.Should().Be(1);
            response.UserId.Should().Be(1);
            response.VoteTypeId.Should().Be(1);
        }