We need to create unit tests for the PassiveBuzzerHelper class located in com.opensourcewithslu.outputdevices. This class controls a passive buzzer, which uses a pulsating AC signal to generate a tone.
Notes
- Verify that the component initializes with the correct configuration.
- Validate that the buzzer can be turned on and off.
- Validate that the frequency outputted by the buzzer can be changed.
- Test the
passiveBuzzTone method to ensure it turns the buzzer on, buzzes for one second, then turns the buzzer off.
- Test that the
toneIterator method turns the buzzer on, correctly plays each of its frequencies for one second each, then turns the buzzer off.
- Test that the
piToneSequence method correctly turns the buzzer on plays, frequencies representing the first ten digits of pi, then turns the buzzer off.
Acceptance Criteria
We need to create unit tests for the
PassiveBuzzerHelperclass located incom.opensourcewithslu.outputdevices. This class controls a passive buzzer, which uses a pulsating AC signal to generate a tone.Notes
passiveBuzzTonemethod to ensure it turns the buzzer on, buzzes for one second, then turns the buzzer off.toneIteratormethod turns the buzzer on, correctly plays each of its frequencies for one second each, then turns the buzzer off.piToneSequencemethod correctly turns the buzzer on plays, frequencies representing the first ten digits of pi, then turns the buzzer off.Acceptance Criteria
com.opensourcewithslu.outputdevicespackage in thepi4micronaut-utils/src/testdirectory.