private async Task DeleteIndividualAsync() { _informationPublisher.Publish(InformationEntry.CreateInfo($"Deleting Individual {_context.SelectedIndividual.FormattedName}..", true)); await _overviewService.DeleteIndividualAsync(_context.SelectedIndividual.Id); _context.Individuals.Remove(_context.SelectedIndividual); _informationPublisher.Publish(InformationEntry.CreateSuccess("Individual deleted", false, 5)); }
public void CreatingSuccess_CreatesSuccessEntry_WithPassedParameters() { // Arrange const bool ShowBusy = true; const string Message = "Hello"; // Act var actualInfoEntry = InformationEntry.CreateSuccess(Message, ShowBusy); // Assert Assert.AreEqual(ShowBusy, actualInfoEntry.ShowBusy); Assert.AreEqual(Message, actualInfoEntry.Message); Assert.IsNull(actualInfoEntry.DisplayLengthInSeconds); Assert.AreEqual(InformationEntryType.Success, actualInfoEntry.EntryType); }