Description:
Write unit tests for the ActiveBuzzHelper class to ensure the proper functionality of all its methods, including turning the buzzer on and off, executing a beep sequence, playing intermittent tones, and generating Morse code patterns.
Tasks:
-
Test Buzzer Methods
Write tests to verify that activeBuzzerOn() correctly sets the duty cycle and frequency, updates actBuzzCheck flag, and logs correct messages
Write tests for activeBuzzerOff() to confirm that the buzzer turns off and the state flag is updated
-
Test Beep Method
Write a test for the beep() method to simulate the 2-second beep sequence
so the buzzer state transitions are correct
-
Test Intermittent Tone Method
Write tests for intermittentTone() to validate that the buzzer toggles on and off for the correct durations
-
Test Morse Code Tone Method
Write a test for morseCodeTone() to ensure that the sequence for “pi” in Morse code is executed as intended
Acceptance Criteria:
Description:
Write unit tests for the ActiveBuzzHelper class to ensure the proper functionality of all its methods, including turning the buzzer on and off, executing a beep sequence, playing intermittent tones, and generating Morse code patterns.
Tasks:
Test Buzzer Methods
Write tests to verify that activeBuzzerOn() correctly sets the duty cycle and frequency, updates actBuzzCheck flag, and logs correct messages
Write tests for activeBuzzerOff() to confirm that the buzzer turns off and the state flag is updated
Test Beep Method
Write a test for the beep() method to simulate the 2-second beep sequence
so the buzzer state transitions are correct
Test Intermittent Tone Method
Write tests for intermittentTone() to validate that the buzzer toggles on and off for the correct durations
Test Morse Code Tone Method
Write a test for morseCodeTone() to ensure that the sequence for “pi” in Morse code is executed as intended
Acceptance Criteria: