-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#27: Synergy.Documentation: Added description of using Comments As Co…
…de into README.md
- Loading branch information
1 parent
303645b
commit f5b8076
Showing
8 changed files
with
180 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
.../Synergy.Documentation.Tests/Architecture/Debt/Todos.Technical.Debt.verified.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 38 additions & 2 deletions
40
Documentation/Synergy.Documentation.Tests/Comments/NoteTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,42 @@ | ||
namespace Synergy.Documentation.Tests.Comments; | ||
using Synergy.Catalogue; | ||
using Synergy.Documentation.Annotations; | ||
|
||
namespace Synergy.Documentation.Tests.Comments; | ||
|
||
[CodeFilePath] | ||
public class NoteTests | ||
{ | ||
// TODO: Marcin Celej [from: Marcin Celej on: 08-01-2024]: Add tests for Note class | ||
[Fact] | ||
public void ShowOff() | ||
{ | ||
this.Comment("Here you have full sample of comments as code") | ||
.Because("I want to show you how to use them") | ||
.DoNothing("because this is just a comment") | ||
.Because("I want to show you how to use them") | ||
.DoNotThrowException("because this is just a comment") | ||
.Because("I want to show you how to use them") | ||
.Then("I want to show you how to use them") | ||
.But("I want to show you how to use them") | ||
.Therefore("I want to show you how to use them") | ||
.Otherwise("I want to show you how to use them") | ||
.Moreover("I want to show you how to use them"); | ||
} | ||
|
||
[Fact] | ||
public void CommentsTests() | ||
{ | ||
try | ||
{ | ||
var list = new List<string>(10.Because("we do not waste memory when we know exact size of the list")); | ||
|
||
if (list.IsEmpty()) | ||
this.DoNothing("because we do not have any items in the list"); | ||
} | ||
catch | ||
{ | ||
this.DoNotThrowException("when something bad happens here") | ||
.Because("this code should always work") | ||
.Therefore("we should log the exception at least"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters