public void MaxSize(int size) { var collection = new EventCollection(size); var data = new LinkedList <Event>(); for (var i = 0; i < size; i++) { var @event = new Event(_fixture.Create <object>()); data.AddLast(@event); collection.Enqueue(@event, ""); } collection.ToArray().Length.Should().Be(size); collection.ToArray().Should().BeEquivalentTo(data); var event2 = new Event(_fixture.Create <object>()); data.AddLast(@event2); data.RemoveFirst(); collection.Enqueue(@event2, ""); collection.ToArray().Length.Should().Be(size); collection.ToArray().Should().BeEquivalentTo(data); }