Beispiel #1
0
        public void MapModelToBO()
        {
            var mapper = new BOLBadgeMapper();
            ApiBadgeRequestModel model = new ApiBadgeRequestModel();

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

            response.Date.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.UserId.Should().Be(1);
        }
Beispiel #2
0
        public void MapBOToModelList()
        {
            var     mapper = new BOLBadgeMapper();
            BOBadge bo     = new BOBadge();

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

            response.Count.Should().Be(1);
        }
Beispiel #3
0
        public void MapBOToModel()
        {
            var     mapper = new BOLBadgeMapper();
            BOBadge bo     = new BOBadge();

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

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