public async Task DeleteCustomerNote_ValidArguments_InvokeRepositoryAndPublishEvent() { await _noteService.DeleteCustomerNote(new CustomerNote()); _repositoryMock.Verify(c => c.DeleteAsync(It.IsAny <CustomerNote>()), Times.Once); _mediatorMock.Verify(c => c.Publish(It.IsAny <EntityDeleted <CustomerNote> >(), default(CancellationToken)), Times.Once); }
public JsonResult DeleteCustomerNote(string Id) { ICustomerNoteService dataService = new CustomerNoteService(); object deleteResult = dataService.DeleteCustomerNote(customernoteContext, Id); return(Json(deleteResult, JsonRequestBehavior.AllowGet)); // deleteResult: {Successful = value, Message = vlue} }