public async Task Should_Be_Able_To_Create_A_District()
        {
            var districtCreateDto = new DistrictCreateDto
            {
                Id         = "Colombo Fun",
                ProvinceID = "Western"
            };

            var districtDto = await DistrictAppService.CreateAsync(districtCreateDto);

            districtDto.ShouldNotBeNull();
            districtDto.Id.ShouldNotBeNullOrEmpty();
            districtDto.Id.ShouldNotBeNullOrWhiteSpace();
            districtDto.Id.ShouldBe(districtCreateDto.Id);
            districtDto.ProvinceID.ShouldBe(districtCreateDto.ProvinceID);
        }
Пример #2
0
 public async Task <DistrictDto> Create([FromBody] DistrictCreateDto dto)
 {
     return(await DistrictAppService.CreateAsync(dto));
 }