public void MapServerRequestToResponse()
        {
            var mapper = new ApiPetServerModelMapper();
            var model  = new ApiPetServerRequestModel();

            model.SetProperties(1, 1, "A", 1);
            ApiPetServerResponseModel response = mapper.MapServerRequestToResponse(1, model);

            response.Should().NotBeNull();
            response.BreedId.Should().Be(1);
            response.ClientId.Should().Be(1);
            response.Name.Should().Be("A");
            response.Weight.Should().Be(1);
        }
Пример #2
0
        public void MapServerRequestToResponse()
        {
            var mapper = new ApiPetServerModelMapper();
            var model  = new ApiPetServerRequestModel();

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

            response.Should().NotBeNull();
            response.AcquiredDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.BreedId.Should().Be(1);
            response.Description.Should().Be("A");
            response.PenId.Should().Be(1);
            response.Price.Should().Be(1m);
        }