public void GetPublishQueueReturnsEmptyIdListIfNoItemsAdded( [Greedy] FakeDataProvider sut, CallContext context) { var result = sut.GetPublishQueue(DateTime.MinValue, DateTime.MaxValue, context); result.Should().BeEmpty(); }
public void GetPublishQueueReturnsIdListWithoutDuplicatedIDs( [Greedy] FakeDataProvider sut, ID itemId, string action, DateTime date, CallContext context) { sut.AddToPublishQueue(itemId, action, date, context); sut.AddToPublishQueue(itemId, action, date, context); var result = sut.GetPublishQueue(DateTime.MinValue, DateTime.MaxValue, context); result.ShouldBeEquivalentTo(new IDList { itemId }); }
public void GetPublishQueueReturnsIdListFilteredByDates( int daysBeforePublishingDate, int daysAfterPublishingDate, int expectedCount, [Greedy] FakeDataProvider sut, ID itemId, string action, DateTime date, CallContext context) { var from = date.Add(TimeSpan.FromDays(daysBeforePublishingDate)); var to = date.Add(TimeSpan.FromDays(daysAfterPublishingDate)); sut.AddToPublishQueue(itemId, action, date, context); var result = sut.GetPublishQueue(from, to, context); result.Count.Should().Be(expectedCount); }