/// <summary> /// If these ones fail, one should consider to kill him/herself and never touch keyboard again! /// </summary> public void BasicTests() { Assert.AreEqual(_materializedSeries.Count, _testSeries.Count()); Assert.AreEqual(_materializedSeries.IsEmpty, !_testSeries.Any()); Assert.AreEqual(_materializedSeries.IsReadOnly, _testSeries.IsReadOnly); if (_materializedSeries.Count == 0) { return; } Assert.AreEqual(_materializedSeries.First, _testSeries.First()); Assert.AreEqual(_materializedSeries.Last, _testSeries.Last()); foreach (var kvp in _materializedSeries) { KeyValuePair <K, V> tkvp; if (_testSeries.TryFind(kvp.Key, Lookup.EQ, out tkvp)) { Assert.AreEqual(kvp, tkvp); } } for (int i = 0; i < 1000; i++) { var idx = _rng.Next(_materializedSeries.Count); // TODO (UX) Public cannot get key by index var v = _materializedSeries.GetAt(idx); var k = _materializedSeries.keys[idx]; V tv; if (_testSeries.TryGetValue(k, out tv)) { Assert.AreEqual(v, tv); } } }