Backend Development
TDD Using xUnit
SharpCodder
August 27, 2025

Test Driven Development
What is it?
Test Driven Development is a way of writing code where the tests come first.
When to use it?
Sometimes
Heading 1 | Heading 2 |
|---|---|
Test | Tble |
1const options = {
2 renderNode: {
3 [BLOCKS.PARAGRAPH]: (node, children) => {
4 // If paragraph contains only code, render as pre/code
5 const hasOnlyCode = node.content.length === 1 &&
6 node.content[0].marks?.some(m => m.type === 'code');
7
8 if (hasOnlyCode) {
9 return <pre><code>{node.content[0].value}</code></pre>;
10 }
11 return <p>{children}</p>;
12 }
13 }
14};Tags
#TDD#.Net#xUnit#Unit Testing