public void TestRisingFrontsDetectionOnEmptySeries() { SeriesStatisticsCollector ssc = new SeriesStatisticsCollector(100); NUnit.Framework.Assert.AreEqual(0, ssc.GetLastRisingFrontAmplitude()); NUnit.Framework.Assert.AreEqual(0, ssc.GetLastRisingFrontDuration()); }
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()); }
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()); }