private void checkContainsInOrder(ConcurrentLinkedDictionary <int, int> map, params int[] expect) { map.DrainBuffers(); List <int> evictionList = new List <int> (); foreach (ConcurrentLinkedDictionary <int, int> .Node node in map.evictionDeque) { evictionList.Add(node.Key); } Assert.That(map.Count, Is.EqualTo(expect.Length)); Assert.That(map.Keys, CollectionConstraints.ContainsInAnyOrder <int>(expect)); Assert.That(evictionList, Is.EqualTo(asList(expect))); }
protected Constraint HasCount(int count) { return(CollectionConstraints.HasCount(count)); }