public async Task UpdatesAllActiveEvents() { var cursor = new DateTime(2018, 10, 10); var inactiveEvent = new EventEntity { RowKey = "inactive", EndTime = new DateTime(2018, 10, 11) }; var activeEvent1 = new EventEntity { RowKey = "active1" }; var activeEvent2 = new EventEntity { RowKey = "active2" }; Table.SetupQuery(inactiveEvent, activeEvent1, activeEvent2); EventUpdater .Setup(x => x.UpdateAsync(activeEvent1, cursor)) .Returns(Task.CompletedTask) .Verifiable(); EventUpdater .Setup(x => x.UpdateAsync(activeEvent2, cursor)) .Returns(Task.CompletedTask) .Verifiable(); await Updater.UpdateAllAsync(cursor); EventUpdater.Verify(); EventUpdater .Verify( x => x.UpdateAsync(inactiveEvent, It.IsAny <DateTime>()), Times.Never()); }
public ListViewerGroup(ListViewer listViewer) { this.listViewer = listViewer; updater = new EventUpdater <int>(); }