Exemple #1
0
        public void PointA_GetEnumeratorTest()
        {
            var p = new PointA(123.456, 789.012);

            Assert.IsInstanceOfType(p.GetEnumerator(), typeof(IEnumerator <double>));

            IEnumerator <double> pe = p.GetEnumerator();

            pe.MoveNext();
            Assert.AreEqual(123.456, pe.Current);
            pe.MoveNext();
            Assert.AreEqual(789.012, pe.Current);
        }
Exemple #2
0
        public void PointA_GetEnumeratorTest()
        {
            var p = new PointA(123.456, 789.012);

            Assert.IsAssignableFrom <IEnumerator <double> >(p.GetEnumerator());

            IEnumerator <double> pe = p.GetEnumerator();

            pe.MoveNext();
            Assert.Equal(123.456, pe.Current);
            pe.MoveNext();
            Assert.Equal(789.012, pe.Current);
        }