Skip to content

Commit

Permalink
Update GenericRecognizerTests.cs
Browse files Browse the repository at this point in the history
Issue #471 Adjust this unit test following all previous changes to the methods that find harmonic events.
  • Loading branch information
towsey committed Jun 12, 2021
1 parent 17a0fd2 commit 6abe578
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,15 @@ public void TestHarmonicsAlgorithm()
Assert.AreEqual(4, allResults.NewEvents.Count);

var @event = (SpectralEvent)allResults.NewEvents[0];
Assert.AreEqual("Harmonics", @event.Name);
Assert.AreEqual("SpectralEvent", @event.ComponentName);
Assert.AreEqual("Stacked harmonics", @event.Name);
Assert.AreEqual("HarmonicEvent", @event.ComponentName);
Assert.AreEqual(3.0, @event.EventStartSeconds, 0.1);
Assert.AreEqual(4.0, @event.EventEndSeconds, 0.1);
Assert.AreEqual(500, @event.LowFrequencyHertz);
Assert.AreEqual(5000, @event.HighFrequencyHertz);

@event = (SpectralEvent)allResults.NewEvents[1];
Assert.AreEqual(5.2, @event.EventStartSeconds, 0.1);
Assert.AreEqual(5.2, @event.EventStartSeconds, 0.15);
Assert.AreEqual(5.5, @event.EventEndSeconds, 0.1);

@event = (SpectralEvent)allResults.NewEvents[2];
Expand All @@ -453,7 +453,7 @@ public void TestHarmonicsAlgorithm()

@event = (SpectralEvent)allResults.NewEvents[3];
Assert.AreEqual(11.3, @event.EventStartSeconds, 0.1);
Assert.AreEqual(11.6, @event.EventEndSeconds, 0.1);
Assert.AreEqual(11.6, @event.EventEndSeconds, 0.15);
}

[TestMethod]
Expand Down

0 comments on commit 6abe578

Please sign in to comment.