Summary
In this chapter, you tested the JournalEntry class to determine if it works as expected.
First, you added a new Unit Testing target to your app. Next, you wrote some tests for the JournalEntry
class, and finally, you ran tests on your JournalEntry
class to make sure it works as it should.
You have now learned how to write tests for the classes in your app to make sure that they work as intended. This will be useful for larger projects involving many people, where you are not able to view the source code for all the classes in your project, and also ensure that changes made anywhere in the app do not break existing functionality.
In the next chapter, you’ll learn about Apple Intelligence, Apple’s implementation of AI technology introduced during WWDC24.