Contained in: Android Test-Driven Development by Tutorials
design patterns
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Architecting for Testing
Jul 21 2021 · Chapter
…such as UI or integration tests, to unit tests, which are faster. To achieve a robust architecture, it’s important to know and understand design patterns and the SOLID principles. Design patterns It’s not uncommon for developers to encounter the same problems in different projects and platforms…
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Introduction
Jul 21 2021 · Chapter
…know enough about Kotlin that you’re comfortable working with it. Although it’s not required, it’s helpful to have an understanding of design patterns, dependency injection and app architecture. Whether you’re new to testing and TDD, or eager to apply your existing knowledge to your apps…
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Unit Tests
Jul 21 2021 · Chapter
…final version of the code for this chapter. In the next chapter, “Architecting for Testing,” you’ll learn about good practices and design patterns, that will ensure a good architecture and encourage testability. Afterwards, you’ll continue working on this project, creating unit tests using a complementary library called Mockito…
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Common Legacy App Problems
Jul 21 2021 · Chapter
…happen, the less consistent the architecture, the more likely you are to see this. Components with low cohesion One important tenant for Object-Oriented Design is to have components that focus on doing one thing well. This is also referred to as cohesion. For example, let’s say you have…
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Testing Around Other Components
Jul 21 2021 · Chapter
…boundary. Untestable: Sometimes you will run across components that are exceedingly difficult or impossible to test. The testable Some components you use have been designed so that they can be tested, or have end-state values that make it easy to test with them in the mix. For example…
Android & Kotlin
Chapter in Android Test-Driven Development by Tutorials
Introduction to Mockito
Jul 21 2021 · Chapter
Learn what mocking and stubbing are and when to use these techniques. Write more unit tests using the test-driven development (TDD) pattern to continue testing state, and a way to also verify behavior. Why Mockito? If you remember from a previous chapter, whenever you create a test, you must…