예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
        public void CountElements()
        {
            EnumDataset <int> ds = new EnumDataset <int>(new int[] { 1, 2, 3 });

            Assert.AreEqual(3, ds.Count());
        }