public void Delete_ShouldDeletemarkGeneralDataPoint()
        {
            // Arrange
            int id        = _markGeneralDataPoints[0].Id;
            int markId    = _markGeneralDataPoints[0].Mark.Id;
            int sectionId = _markGeneralDataPoints[0].Section.Id;

            // Act
            _service.Delete(id, markId, sectionId);

            // Assert
            _repository.Verify(mock => mock.Delete(It.IsAny <MarkGeneralDataPoint>()), Times.Once);
        }
示例#2
0
 public ActionResult Delete(int markId, int sectionId, int id)
 {
     try
     {
         _service.Delete(id, markId, sectionId);
         return(NoContent());
     }
     catch (ArgumentNullException)
     {
         return(NotFound());
     }
 }