//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldHandleWhenEmpty() public virtual void ShouldHandleWhenEmpty() { DefaultComparatorTopTable <long> table = new DefaultComparatorTopTable <long>(_comparator, 10); table.Sort(); IEnumerator <long> iterator = table.GetEnumerator(); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(iterator.hasNext()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldHandleWhenNotCompletelyFilledToCapacity() public virtual void ShouldHandleWhenNotCompletelyFilledToCapacity() { DefaultComparatorTopTable <long> table = new DefaultComparatorTopTable <long>(_comparator, 20); foreach (long?i in _testValues) { table.Add(i.Value); } table.Sort(); IEnumerator <long> iterator = table.GetEnumerator(); for (int i = 0; i < _testValues.Length; i++) { //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertTrue(iterator.hasNext()); //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: long value = iterator.next(); assertEquals(_expectedValues[i], value); } //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: assertFalse(iterator.hasNext()); }