示例#1
0
        public void EditDataCollector_WhenDataCollectorDoesNotExist_ShouldThrowException()
        {
            // Arrange
            var dataCollector = new EditDataCollectorRequestDto
            {
                Id           = 3,
                PhoneNumber  = DataCollectorPhoneNumber3,
                SupervisorId = SupervisorId,
                VillageId    = _nyssContextMock.Villages.ToList()[0].Id,
                Latitude     = 15,
                Longitude    = 45
            };

            Should.ThrowAsync <Exception>(() => _dataCollectorService.Edit(dataCollector));
        }
示例#2
0
 public async Task <Result> Edit([FromBody] EditDataCollectorRequestDto editDataCollectorDto) =>
 await _dataCollectorService.Edit(editDataCollectorDto);