Software Testing - Fundamentals Exercises
Software Testing - Fundamentals Exercises
www.sdacademy.pl
Exercises: Software Testing - fundamentals
2. Change Calculator class from task one to use the AssertJ assertion.
3. Implement the method in the ArrayExample class using the TDD approach:
www.sdacademy.pl
Exercises: Software Testing - fundamentals
4. Using the TDD approach, write a method that validates the email address pass
in the parameter.
5. For the Account class containing the fields: balance, account number, name of
the owner, create a method and write its unit tests, which simulates making a
transfer between two bank accounts. In tests, check the correctness of the
account number (26 digits), balance for the account after sending / receiving
the transfer, whether all of the above fields in the transfer have been
completed, whether the amount of the outgoing transfer is less than or equal
to the value of funds on the account.
www.sdacademy.pl
Exercises: Software Testing - fundamentals
6. Write a program that will represent the shopping cart in the online bookstore.
Create a Book class that has a title, author and price. Add a Basket class that
stores a list of books. When using TDD, add a method:
www.sdacademy.pl
Exercises: Software Testing - fundamentals
7. Write a program that imitates file operations. Then write check tests: file
creation, write, read, file cleanup. Use lifecycle methods.
www.sdacademy.pl