public async void CanClearComments() { await _mainWindowVm.ClearComments(); _commentsPersist.Received(1).Delete(_mainWindowVm.PullRequestLocator).IgnoreAsyncWarning(); foreach (var diff in _mainWindowVm.Diffs) { Assert.IsNullOrEmpty(diff.Comments); } Assert.IsNullOrEmpty(_mainWindowVm.GeneralComments); }
private async void ClearComments() { if (MessageBoxHelper.ShowConfirmation(this, "Are you sure to clear all the comments locally.") == MessageBoxResult.No) { return; } try { await _viewModel.ClearComments(); } catch (Exception ex) { MessageBoxHelper.ShowError(this, "Unable to delete local comments.\r\n\r\n" + ex); } }