コード例 #1
0
        public void Send(VehiclePlot vehiclePlot)
        {
            var vehiclePlotDto         = _vehiclePlotMapper.ToDto(vehiclePlot);
            var vehiclePlotMessageBody = _vehiclePlotSerializer.Serialize(vehiclePlotDto);

            _messagingService.SendMessage(vehiclePlotMessageBody);
        }
コード例 #2
0
        public void Should_map_vehicle_plot_to_dto(int vehicleId, double latitude, double longitude, EventCode eventCode)
        {
            //Arrange
            var vehiclePlot = new VehiclePlot(vehicleId, latitude, longitude, DateTime.UtcNow, eventCode);

            //Act
            var vehiclePlotDto = Sut.ToDto(vehiclePlot);

            //Assert
            vehiclePlotDto.VehicleId.Should().Be(vehiclePlot.VehicleId);
            vehiclePlotDto.Latitude.Should().Be(vehiclePlot.Latitude);
            vehiclePlotDto.Longitude.Should().Be(vehiclePlot.Longitude);
            vehiclePlotDto.Timestamp.Should().Be(vehiclePlot.Timestamp);
            vehiclePlotDto.EventCode.Should().Be(vehiclePlot.EventCode);
        }