03: Unit Tests
Submit this homework using Gradescope. You can type up your answers, or write legibly and scan them. Do not attempt to submit a paper copy in class, as it will not be accepted.
Write a single concise, correct, and well-formed test method for each of the following requirements. Remember the decorator (@Test
), and use the appropriate assertion (which should be one of assertEquals
, assertTrue
, or assertFalse
). (1 point each)
- Test the
toLowerCase
method ofString
on the string"ASDF"
. - Test the
isLetterOrDigit
method ofCharacter
on each of the characters'A'
,'&'
, and'2'
. (Use three assertions, all in one method.) - Test the
max
method ofMath
on twoint
arguments of your choice. - Test the
min
method ofMath
on the same arguments you used in the previous test.