public void MapServerResponseToRequest()
        {
            var mapper = new ApiPetServerModelMapper();
            var model  = new ApiPetServerResponseModel();

            model.SetProperties(1, 1, 1, "A", 1);
            ApiPetServerRequestModel response = mapper.MapServerResponseToRequest(model);

            response.Should().NotBeNull();
            response.BreedId.Should().Be(1);
            response.ClientId.Should().Be(1);
            response.Name.Should().Be("A");
            response.Weight.Should().Be(1);
        }
Exemple #2
0
        public void MapServerResponseToRequest()
        {
            var mapper = new ApiPetServerModelMapper();
            var model  = new ApiPetServerResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), 1, "A", 1, 1m);
            ApiPetServerRequestModel response = mapper.MapServerResponseToRequest(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);
        }