Test-Driven Development with Java by Alan Mellor
Author:Alan Mellor
Language: eng
Format: epub
Publisher: Packt
Published: 2023-11-15T00:00:00+00:00
Weâve already learned how to write tests using the arrange, act, and assert template. Weâve also learned about some software design principles, known as the SOLID principles, that help us break our software down into smaller components. Finally, weâve learned how test doubles can stand in for collaborating components to make FIRST unit tests easier to write. In this chapter, weâre going to combine all those techniques into a powerful design approach known as the hexagonal architecture.
Using this approach, we will benefit from getting more of our application logic under unit tests and reducing the number of integration and end-to-end tests required. We will build in a natural resilience to changes outside our application. Development chores such as changing a database supplier will be simplified, by having fewer places where our code needs to be changed. We will also be able to unit test across larger units, bringing some tests that require end-to-end testing in other approaches under unit tests instead.
In this chapter, weâre going to cover the following main topics:
Why external systems are difficult
Dependency inversion to the rescue
Abstracting out the external system
Writing the domain code
Substituting test doubles for external systems
Unit testing bigger units
Wordz â abstracting the database
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
AI & Machine Learning | Bioinformatics |
Computer Simulation | Cybernetics |
Human-Computer Interaction | Information Theory |
Robotics | Systems Analysis & Design |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8253)
Test-Driven Development with Java by Alan Mellor(6372)
Data Augmentation with Python by Duc Haba(6269)
Principles of Data Fabric by Sonia Mezzetta(6044)
Hadoop in Practice by Alex Holmes(5933)
Learn Blender Simulations the Right Way by Stephen Pearson(5901)
Microservices with Spring Boot 3 and Spring Cloud by Magnus Larsson(5797)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5779)
RPA Solution Architect's Handbook by Sachin Sahgal(5194)
Big Data Analysis with Python by Ivan Marin(5167)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5097)
The Infinite Retina by Robert Scoble Irena Cronin(4881)
Pretrain Vision and Large Language Models in Python by Emily Webber(4142)
Functional Programming in JavaScript by Mantyla Dan(4014)
The Age of Surveillance Capitalism by Shoshana Zuboff(3907)
Infrastructure as Code for Beginners by Russ McKendrick(3901)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3607)
Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson(3415)
Applied Machine Learning for Healthcare and Life Sciences Using AWS by Ujjwal Ratan(3391)
