public async Task Should_Be_Able_To_Create_A_Distance_Charge() { var distanceChargeCreateDto = new DistanceChargeCreateUpdateDto { From = 0, Charge = 200 }; var distanceChargeDto = await DistanceChargeAppService.CreateAsync(distanceChargeCreateDto); distanceChargeDto.ShouldNotBeNull(); distanceChargeDto.Id.ShouldBeGreaterThan(0); distanceChargeDto.From.ShouldBe(distanceChargeCreateDto.From); distanceChargeDto.Charge.ShouldBe(distanceChargeCreateDto.Charge); }
public async Task <DistanceChargeDto> Update([FromRoute] int id, [FromBody] DistanceChargeCreateUpdateDto dto) { return(await DistanceChargeAppService.UpdateAsync(id, dto)); }
public async Task <DistanceChargeDto> Create([FromBody] DistanceChargeCreateUpdateDto dto) { return(await DistanceChargeAppService.CreateAsync(dto)); }