Exemple #1
0
    public List <DataPoint> ToList()
    {
        IEnumerable <DataPoint> source = this.Source();

        using DataPointIterator filtered = source.SwingingDoorCompression(0.1);
        return(filtered.ToList());
    }
Exemple #2
0
        public List <DataPoint> ToList()
        {
            IEnumerable <DataPoint> source   = this.Source();
            DataPointIterator       filtered = source.DeadBandCompression(0.1);

            return(filtered.ToList());
        }
Exemple #3
0
        public void MoveNext___false()
        {
            DataPointIterator sut = DataPointIterator.Empty;

            Assert.IsFalse(sut.MoveNext());
            Assert.AreSame(sut, sut.Clone());
            Assert.AreSame(Array.Empty <DataPoint>(), sut.ToArray());
            Assert.AreEqual(0, sut.ToList().Count);
        }
Exemple #4
0
        public void List_iterated_and_ToList___OK()
        {
            var sut      = new NoCompression();
            var data     = RawDataForTrend().ToList();
            var expected = RawDataForTrend().ToList();

            DataPointIterator dataPointIterator = sut.Process(data);

            DataPointIterator enumerator = dataPointIterator.GetEnumerator();

            enumerator.MoveNext();
            enumerator.MoveNext();
            var actual = dataPointIterator.ToList();

            CollectionAssert.AreEqual(expected, actual);
        }