public void Add(IClosedDocument document) { if (document == null) { return; } //Remove duplications var docs = ClosedDocuments .Where(x => _closedDocumentComparer.Equals(x, document)) .ToArray(); //TODO: use intersect foreach (var doc in docs) { ClosedDocuments.Remove(doc); } //TODO: filter history by MaxAllowed Number and Days... ClosedDocuments.AddFirst(document); OnHistoryChanged(); }
public void Equals_Should_Handle_Null() { var ret = _closedDocumentComparer.Equals(null, null); Assert.True(ret); }