Skip to content

Commit 57e50aa

Browse files
Fix document and schema
1 parent 2c275f2 commit 57e50aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ The main approach of these tools is to perform unit tests without using mocking
2020
- Around 30% to 40% of the code in applications is located in the Data Access layer or repository components. Because it is hard to unit test, developers often skip testing,
2121
resulting in lower code coverage.
2222
- When using a mock or in-memory approach for a `DbContext`, you don't truly test the Entity Framework mapping to your database, especially additional SQL constraints like nullability, uniqueness, foreign key cascades, etc.
23-
You also miss technical behaviors like transactions, connection management, etc.
23+
You also miss technical behaviors like transactions, connection management, triggers, etc.
2424
- When inserting data, it is crucial to ensure that the data in the columns are stored correctly (null/not null values, enum values to numerical values, custom or JSON serialized data, etc.).
25-
- If you use Entity Framework, you can detect warnings/errors raised by the `DbContext` that might not appear in logs when deploying the application.
25+
- If you use Entity Framework, you can detect warnings/errors raised by the `DbContext` during the development.
2626
- You perform unit test cases, meaning you write simple tests to validate small features instead of writing complex integration tests.
2727

2828
## How to unit test a Data Access Layer

docs/Schemas.drawio

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<mxfile host="app.diagrams.net" modified="2024-09-02T06:54:31.944Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" etag="ZY5pfjGrg3VgHh5RWZqM" version="24.4.13" type="device">
1+
<mxfile host="app.diagrams.net" modified="2024-09-02T14:09:05.848Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" etag="vwvow3jGbsEjk7Y88DOV" version="24.4.13" type="device">
22
<diagram name="Page-1" id="QPbXzzLTBWISDKUypI0Z">
33
<mxGraphModel dx="1728" dy="915" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
44
<root>
@@ -60,7 +60,7 @@
6060
<mxCell id="fzyzF6r53QvBfYvWiB2a-20" value="..." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
6161
<mxGeometry x="640" y="400" width="70" height="30" as="geometry" />
6262
</mxCell>
63-
<mxCell id="fzyzF6r53QvBfYvWiB2a-21" value="Mock / In memory tests coverage" style="rounded=0;whiteSpace=wrap;html=1;textDirection=vertical-rl;rotation=-180;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
63+
<mxCell id="fzyzF6r53QvBfYvWiB2a-21" value="PosInformatique.UnitTests.Databases unit test approach" style="rounded=0;whiteSpace=wrap;html=1;textDirection=vertical-rl;rotation=-180;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
6464
<mxGeometry x="180" y="100" width="40" height="340" as="geometry" />
6565
</mxCell>
6666
<mxCell id="fzyzF6r53QvBfYvWiB2a-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;strokeWidth=1;" edge="1" parent="1" source="fzyzF6r53QvBfYvWiB2a-15" target="fzyzF6r53QvBfYvWiB2a-16">

0 commit comments

Comments
 (0)