Skip to content

Commit 24a90ad

Browse files
committedNov 24, 2019
Update README - add 3.12 Architecture Unit Tests, NetArchTest to technologies and article to Testing
1 parent 15190e5 commit 24a90ad

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
 

‎README.md

+17
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ Full Modular Monolith .NET application with Domain-Driven Design approach.
5252

5353
  [3.11 Architecture Decision Log](#311-architecture-decision-log)
5454

55+
  [3.12 Architecture Unit Tests](#312-architecture-unit-tests)
56+
5557
[4. Technology](#4-technology)
5658

5759
[5. How to Run](#5-how-to-run)
@@ -941,6 +943,19 @@ All Architectural Decisions (AD) are documented in the [Architecture Decision Lo
941943

942944
More information about documenting architecture-related decisions in this way : [https://github.com/joelparkerhenderson/architecture_decision_record](https://github.com/joelparkerhenderson/architecture_decision_record)
943945

946+
### 3.12 Architecture Unit Tests
947+
948+
In some cases it is not possible to enforce the application architecture, design or established conventions using compiler (compile-time). For this reason, code implementations can diverge from the original design and architecture. We want to minimize this behavior, not only by code review.</br>
949+
950+
To do this, unit tests of system architecture, design, major conventions and assumptions have been written. In .NET there is special library for this task: [NetArchTest](https://github.com/BenMorris/NetArchTest). This library has been written based on the very popular JAVA architecture unit tests library - [ArchUnit](https://www.archunit.org/).</br>
951+
952+
Using this kind of tests we can test proper layering of our application, dependencies, encapsulation, immutability, DDD correct implementation, naming, conventions and so on - everything what we need to test. Example:</br>
953+
954+
![](docs/Images/architecture_unit_tests.png)
955+
956+
More information about architecture unit tests here: [https://blogs.oracle.com/javamagazine/unit-test-your-architecture-with-archunit](https://blogs.oracle.com/javamagazine/unit-test-your-architecture-with-archunit)
957+
958+
944959
## 4. Technology
945960

946961
List of technologies, frameworks and libraries used for implementation:
@@ -962,6 +977,7 @@ List of technologies, frameworks and libraries used for implementation:
962977
- [NUnit](https://nunit.org/) (Testing framework)
963978
- [NSubstitute](https://nsubstitute.github.io/) (Testing isolation framework)
964979
- [Visual Paradigm Community Edition](https://www.visual-paradigm.com/download/community.jsp) (CASE tool for modeling and documentation)
980+
- [NetArchTest](https://github.com/BenMorris/NetArchTest) (Architecture Unit Tests library)
965981

966982
## 5. How to Run
967983

@@ -1103,6 +1119,7 @@ The project is under [MIT license](https://opensource.org/licenses/MIT).
11031119

11041120
### Testing
11051121
- ["The Art of Unit Testing: with examples in C#"](https://www.amazon.com/Art-Unit-Testing-examples/dp/1617290890) book, Roy Osherove
1122+
- ["Unit Test Your Architecture with ArchUnit"](https://blogs.oracle.com/javamagazine/unit-test-your-architecture-with-archunit) article, Jonas Havers
11061123

11071124
### UML
11081125
- ["UML Distilled: A Brief Guide to the Standard Object Modeling Language (3rd Edition)"](https://www.amazon.com/UML-Distilled-Standard-Modeling-Language/dp/0321193687) book, Martin Fowler
52.3 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.