Esempio n. 1
0
        public void TestRisingFrontsDetectionOnEmptySeries()
        {
            SeriesStatisticsCollector ssc = new SeriesStatisticsCollector(100);

            NUnit.Framework.Assert.AreEqual(0, ssc.GetLastRisingFrontAmplitude());
            NUnit.Framework.Assert.AreEqual(0, ssc.GetLastRisingFrontDuration());
        }
Esempio n. 2
0
        public void TestRisingFrontsDetectionOnSingleValueSequence()
        {
            SeriesStatisticsCollector ssc = new SeriesStatisticsCollector(3);

            ssc.AddValue(0);

            NUnit.Framework.Assert.AreEqual(0, ssc.GetLastRisingFrontAmplitude());
            NUnit.Framework.Assert.AreEqual(1, ssc.GetLastRisingFrontDuration());
        }
Esempio n. 3
0
        public void TestFinishedFront()
        {
            SeriesStatisticsCollector ssc = new SeriesStatisticsCollector(3);

            FrontDetectionTestSequence ts = FinishedFrontSequence;

            ssc.AddSequence(ts.sequence);

            NUnit.Framework.Assert.AreEqual(ts.expected_duration, ssc.GetLastRisingFrontDuration());
            NUnit.Framework.Assert.AreEqual(ts.expected_amplitude, ssc.GetLastRisingFrontAmplitude());
        }