Ejemplo n.º 1
0
        public TripDto Checkin()
        {
            var trip = new Trip
            {
                TripIdentifier = Guid.NewGuid().ToString()
            };

            _tripRepository.Add(trip);

            return(DtoMapper.ConvertTripToDto(trip));
        }
        public void CanConvertTripToDto()
        {
            var trip = new Trip
            {
                Id             = 101,
                TripIdentifier = Guid.NewGuid().ToString(),
                Locations      = TestUtils.GetDummyLocations()
            };

            var tripDto = DtoMapper.ConvertTripToDto(trip);

            Assert.Equal(trip.TripIdentifier, tripDto.TripIdentifier);
            TestUtils.AssertEqual(trip.Locations, tripDto.Locations);
        }