public void GetElements() { EnumDataset<int> ds = new EnumDataset<int>(new int[] { 1, 2, 3 }); var enumerator = ds.GetEnumerator(); for (int k = 1; enumerator.MoveNext(); k++) Assert.AreEqual(k, enumerator.Current); Assert.AreEqual(3, ds.Count()); Assert.IsNotNull(((IEnumerable)ds).GetEnumerator()); }
public void GetElements() { EnumDataset <int> ds = new EnumDataset <int>(new int[] { 1, 2, 3 }); var enumerator = ds.GetEnumerator(); for (int k = 1; enumerator.MoveNext(); k++) { Assert.AreEqual(k, enumerator.Current); } Assert.AreEqual(3, ds.Count()); Assert.IsNotNull(((IEnumerable)ds).GetEnumerator()); }
public void CountElements() { EnumDataset <int> ds = new EnumDataset <int>(new int[] { 1, 2, 3 }); Assert.AreEqual(3, ds.Count()); }