示例#1
0
        public void MapModelToEntity()
        {
            var mapper = new DALVehicleCapabilitiesMapper();
            ApiVehicleCapabilitiesServerRequestModel model = new ApiVehicleCapabilitiesServerRequestModel();

            model.SetProperties(1, 1);
            VehicleCapabilities response = mapper.MapModelToEntity(1, model);

            response.VehicleCapabilityId.Should().Be(1);
            response.VehicleId.Should().Be(1);
        }
示例#2
0
        public void MapEntityToModel()
        {
            var mapper = new DALVehicleCapabilitiesMapper();
            VehicleCapabilities item = new VehicleCapabilities();

            item.SetProperties(1, 1, 1);
            ApiVehicleCapabilitiesServerResponseModel response = mapper.MapEntityToModel(item);

            response.Id.Should().Be(1);
            response.VehicleCapabilityId.Should().Be(1);
            response.VehicleId.Should().Be(1);
        }
示例#3
0
        public void MapEntityToModelList()
        {
            var mapper = new DALVehicleCapabilitiesMapper();
            VehicleCapabilities item = new VehicleCapabilities();

            item.SetProperties(1, 1, 1);
            List <ApiVehicleCapabilitiesServerResponseModel> response = mapper.MapEntityToModel(new List <VehicleCapabilities>()
            {
                { item }
            });

            response.Count.Should().Be(1);
        }