---
title: "Comment by Ahmed Ramy on \"2. Open-Closed in [S.O.L.I.D] Principles.\" | Hashnode"
description: "Nice work, you can also test your saving as a unit and as an integration in Unit tests by mocking the protocol and inject the protocol to the depending class"
url: "https://hashnode.com/posts/2-open-closed-in-solid-principles/61ebe2905fbc177f9f3b4345/comment/61ee7c0be247b2151e61bf37"
---

[Discussion](https://hashnode.com/posts/2-open-closed-in-solid-principles/61ebe2905fbc177f9f3b4345)

Comment [2\. Open-Closed in \[S.O.L.I.D\] Principles.](https://hashnode.com/posts/2-open-closed-in-solid-principles/61ebe2905fbc177f9f3b4345)

[Ahmed Ramy](https://hashnode.com/@aramy)

[Jan 24, 2022](https://hashnode.com/posts/2-open-closed-in-solid-principles/61ebe2905fbc177f9f3b4345/comment/61ee7c0be247b2151e61bf37)

Nice work, you can also test your saving as a unit and as an integration in Unit tests by mocking the protocol and inject the protocol to the depending class
