oss-slu / Pi4Micronaut

A java library combining Micronaut and Pi4j to streamline hardware connectivity to Raspberry Pi's
https://oss-slu.github.io/Pi4Micronaut/
Apache License 2.0
8 stars 7 forks source link

Add Unit Tests for PushButtonHelper Class Initialization #249

Closed yrlmanoharreddy closed 2 months ago

yrlmanoharreddy commented 2 months ago

Description:

This issue involves creating unit tests to verify the initialization logic of the PushButtonHelper class. This is a "good-first-issue" because it involves setting up and verifying basic functionality, making it suitable for newcomers.

Tasks:

1) Test Initialization:

Verify that the initialize() method logs the correct initialization message. Ensure that the isPressed field is set correctly based on the initial state of buttonInput. 2) Test Listener Setup:(additional)

Verify that a DigitalStateChangeListener is added to buttonInput during initialization.

Acceptance Criteria: