예제 #1
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiLocationModelMapper();
            var model  = new ApiLocationRequestModel();

            model.SetProperties(1, 1, "A");
            ApiLocationResponseModel response = mapper.MapRequestToResponse(1, model);

            response.GpsLat.Should().Be(1);
            response.GpsLong.Should().Be(1);
            response.LocationId.Should().Be(1);
            response.LocationName.Should().Be("A");
        }
예제 #2
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiLocationModelMapper();
            var model  = new ApiLocationRequestModel();

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

            response.Availability.Should().Be(1);
            response.CostRate.Should().Be(1m);
            response.LocationID.Should().Be(1);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
        }