public void CanAddDuplicate() { var list = new SortedKeyList <Etag>(); list.Add(ToEtag(1)); list.Add(ToEtag(1)); Assert.Equal(1, list.Count); }
public void CanAddDuplicate() { var list = new SortedKeyList<Etag>(); list.Add(ToEtag(1)); list.Add(ToEtag(1)); Assert.Equal(1, list.Count); }
public void ShouldNotRemoveAnything() { var list = new SortedKeyList <Etag>(); list.Add(ToEtag(6)); list.Add(ToEtag(8)); list.Add(ToEtag(7)); list.RemoveSmallerOrEqual(ToEtag(5)); Assert.Equal(3, list.Count); }
public void ShouldNotRemoveAnything() { var list = new SortedKeyList<Etag>(); list.Add(ToEtag(6)); list.Add(ToEtag(8)); list.Add(ToEtag(7)); list.RemoveSmallerOrEqual(ToEtag(5)); Assert.Equal(3, list.Count); }
public void ShouldRemainOneItem_RemovingItemIsOnTheList() { var list = new SortedKeyList <Etag>(); list.Add(ToEtag(1)); list.Add(ToEtag(3)); list.Add(ToEtag(5)); list.RemoveSmallerOrEqual(ToEtag(3)); Assert.Equal(1, list.Count); Assert.True(list.Contains(ToEtag(5))); }
public void ShouldRemainOneItem_RemovingItemIsOnTheList() { var list = new SortedKeyList<Etag>(); list.Add(ToEtag(1)); list.Add(ToEtag(3)); list.Add(ToEtag(5)); list.RemoveSmallerOrEqual(ToEtag(3)); Assert.Equal(1, list.Count); Assert.True(list.Contains(ToEtag(5))); }
public void AfterUpdate(string key, Etag etagBeforeUpdate) { updatedDocumentsLock.EnterWriteLock(); try { updatedDocuments.Add(etagBeforeUpdate); } finally { updatedDocumentsLock.ExitWriteLock(); } }