CBielstein / APRSsharp

APRS# - Modern APRS software for the amateur radio community
MIT License
12 stars 5 forks source link

Add tests for AprsIsConnection #96

Closed CBielstein closed 2 years ago

CBielstein commented 2 years ago

Description

AprsIsConnection is missing unit tests. They were prototyped a while back but had not been merged in. This PR updates the branch with the latest in main and adds a few tests.

The tests have a timeout while waiting for messages to move. I set the timeout based on multiple runs on my machine, so I suspect they'll be okay, but the timeouts can be upped in the future if they're causing failures.

I also hit a few targets of opportunities for minor tweaks needed in the code.

Changes

Validation

CBielstein commented 2 years ago

I understand the logic of successful login from the changes to the PR, but will we also take into account successful password authentication or we will only care about whether the user has logged in as per the PR?

@eddywine That's a great idea! To avoid "feature creep" in this PR, I've opened #99 so that we can add it in the future. Since this project is so early and not published as a package or anything, we can afford to accept this PR now and make a breaking change in the future.