public virtual ApiBadgeResponseModel MapBOToModel(
            BOBadge boBadge)
        {
            var model = new ApiBadgeResponseModel();

            model.SetProperties(boBadge.Id, boBadge.Date, boBadge.Name, boBadge.UserId);

            return(model);
        }
Beispiel #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiBadgeModelMapper();
            var model  = new ApiBadgeResponseModel();

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

            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.UserId.Should().Be(1);
        }