Skip to content

feat: adds Lesson 16- Kimberlee's object-"headphones" with unit tests #522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Nov 19, 2024

Conversation

haldanek
Copy link
Contributor

@haldanek haldanek commented Nov 1, 2024

Object: HeadPhones

Tests:

  • Default Status: I misread the instructions and thought it said we had to have a custom test(To my shame, I didn’t stop to question what that meant-Lesson learned!).
  • Turn On/Off- Do the headphones turn on and off as they should? (boolean)
  • Volume Increase/Decrease- Do the volume levels work as they should? (int)
  • SetColor- Can you get a different color besides the default black? (enum)
  • Wireless Connection- All headphones are wireless enabled by default, do they connect to bluetooth when powered on? What happens if the headphones cannot connect to bluetooth? (Custom exception)
  • Preferred Brand- Tests if all the brands listed are preferred brands. (Array)
  • Boost Mode- Adds a Bass, Vocal, or Treble boost to the audio experience. Test ensures the headphones cycle through all three boosts correctly. Had to look up the math and syntax on Google. (loop)

Thoughts:

  • I find that I am consistently putting the right things in the wrong places and would really benefit from a lesson on reading error codes and working through them.
  • It is always the tiny details. My test was failing because I had a “void” in a constructor that should not have been there. As soon as I removed it, the test passed. Not even ChatGPT caught this particular faux pas. Lesson: don’t rely too much on AI to check your mess.

End Result:

  • Tests: All passed
  • Coverage: 97%

Copy link

@VicenteVigueras VicenteVigueras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job overall! Please review the changes requested so we can get this merged.

Additionally, please run the spotless command.

@anthonydmays anthonydmays merged commit cef7aa2 into code-differently:main Nov 19, 2024
1 check passed
@haldanek haldanek deleted the Lesson_16 branch November 20, 2024 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants