Skip to content

Commit

Permalink
#28: Managed technical debt for Synergy.Contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinCelej committed May 14, 2023
1 parent 2c8ebe5 commit 19a6130
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 266 deletions.
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
# Technical Debt for Synergy.Contracts

Total: 12
Total: 13

## [BusinessDocumentation.cs](../Requirements/BusinessDocumentation.cs)
## [ContractorRepository.cs](../../../Synergy.Contracts.Samples/ContractorRepository.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 30-04-2023]: Remove this sample project

## [BusinessDocumentation.cs](../../Requirements/BusinessDocumentation.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 08-04-2023]: check that and probably convert docs int tt

## [FailBoolean.cs](../../Synergy.Contracts/Failures/FailBoolean.cs)
## [FailBoolean.cs](../../../Synergy.Contracts/Failures/FailBoolean.cs)
- TODO:mace (from:mace @ 22-10-2016): variable.FailIfFalse(message)
- TODO:mace (from:mace @ 22-10-2016): variable.FailIfTrue(message)

## [FailCast.cs](../../Synergy.Contracts/Failures/FailCast.cs)
## [FailCast.cs](../../../Synergy.Contracts/Failures/FailCast.cs)
- TODO:mace (from:mace @ 22-10-2016): Add [AssertionCondition] below
- TODO:mace (from:mace @ 22-10-2016): public static void Fail.IfArgumentNotCastable<T>([CanBeNull, AssertionCondition(conditionType: AssertionConditionType.IS_NOT_NULL)] string argumentValue)

## [FailCollection.cs](../../Synergy.Contracts/Failures/FailCollection.cs)
## [FailCollection.cs](../../../Synergy.Contracts/Failures/FailCollection.cs)
- TODO:mace (from:mace @ 22-10-2016) public static void IfCollectionDoesNotContain<T>([CanBeNull, AssertionCondition(AssertionConditionType.IS_NOT_NULL)] IEnumerable<T> collection,)

## [FailEquality.cs](../../Synergy.Contracts/Failures/FailEquality.cs)
## [FailEquality.cs](../../../Synergy.Contracts/Failures/FailEquality.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 08-04-2023]: Add variable.OrFailIfEqual(sth)
- TODO:mace (from:mace @ 22-10-2016): a.FailIfEqual(b)
- TODO:mace (from:mace @ 22-10-2016): IfArgumentNotEqual
- TODO:mace (from:mace @ 22-10-2016): a.FailIfNotEqual(b)

## [FailGuid.cs](../../Synergy.Contracts/Failures/FailGuid.cs)
## [FailGuid.cs](../../../Synergy.Contracts/Failures/FailGuid.cs)
- TODO:mace (from:mace @ 22-10-2016): guid.FailIfEmpty

## [FailNullability.cs](../../Synergy.Contracts/Failures/FailNullability.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 08-04-2023]: Use [CallerExpression] here
## [FailNullability.cs](../../../Synergy.Contracts/Failures/FailNullability.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 08-04-2023]: Use [CallerExpression] here - check https://andrewlock.net/exploring-dotnet-6-part-11-callerargumentexpression-and-throw-helpers/
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using VerifyXunit;
using Xunit;

namespace Synergy.Contracts.Test.Documentation;
namespace Synergy.Contracts.Test.Architecture.Debt;

[UsesVerify]
public class Todos
{
[Fact]
public async Task Generate()
{
var rootFolder = CodeFolder.Current().Up(2);
var rootFolder = CodeFolder.Current().Up(3);
var technicalDebt = TodoExplorer.DebtFor("Synergy.Contracts", rootFolder);

await Verifier
Expand Down
27 changes: 27 additions & 0 deletions Contracts/Synergy.Contracts.Test/Architecture/Public/Api.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Threading.Tasks;
using NUnit.Framework;
using Synergy.Documentation.Api;
using VerifyXunit;
using Xunit;

namespace Synergy.Contracts.Test.Architecture.Public
{
[UsesVerify]
public class Api
{
[Fact]
public async Task Generate()
{
// ARRANGE
var assembly = typeof(Fail).Assembly;

// ACT
var publicApi = ApiDescription.GenerateFor(assembly);

// ASSERT
await Verifier.Verify(publicApi, "md")
.UseMethodName("of." + assembly.GetName()
.Name);
}
}
}
Loading

0 comments on commit 19a6130

Please sign in to comment.