diff --git a/.github/workflows/project-regular-checks.yml b/.github/workflows/project-regular-checks.yml index 168a25f..11282ce 100644 --- a/.github/workflows/project-regular-checks.yml +++ b/.github/workflows/project-regular-checks.yml @@ -23,4 +23,10 @@ jobs: - name: Build Solution run: dotnet build --no-restore -c Release - name: Run Tests - run: dotnet test + run: | + dotnet test \ + --coverage \ + --coverage-output-format cobertura \ + --coverage-output .coverage/coverage.cobertura.xml \ + --report-trx \ + --results-directory .coverage diff --git a/.gitignore b/.gitignore index 894a117..fd954be 100644 --- a/.gitignore +++ b/.gitignore @@ -18,13 +18,11 @@ bld/ # visual studio code .vscode/ -# dotnet sdk -global.json - # generated file **/Generated/**/*.cs **/.benchmark/** **/**/*.dll +.coverage/ # generated schemas **/*.schema.json diff --git a/Directory.Build.props b/Directory.Build.props index 5f334af..9e894be 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,6 +10,7 @@ true true true + true diff --git a/Directory.Packages.props b/Directory.Packages.props index a36a391..a17c949 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -27,6 +27,8 @@ + + diff --git a/csharp/CSharp/PropertiesAndFields.cs b/csharp/CSharp/PropertiesAndFields.cs index 6261d4f..c8f0338 100644 --- a/csharp/CSharp/PropertiesAndFields.cs +++ b/csharp/CSharp/PropertiesAndFields.cs @@ -4,14 +4,14 @@ namespace CSharp; public class PropertiesAndFields(ILogger _logger) { - string _filed = "field"; + string _field = "field"; - public string WithOutFieldKeyword { get => _filed; set => _filed = value; } + public string WithOutFieldKeyword { get => _field; set => _field = value; } public string WithFieldKeyword { get; set => field = value.Trim(); } = "WithField"; public void FieldKeyword() { - _logger.LogInformation($"_field => '{_filed}'"); + _logger.LogInformation($"_field => '{_field}'"); _logger.LogInformation($"WithOutFieldKeyword => '{WithOutFieldKeyword}'"); _logger.LogInformation($"WithFieldKeyword => '{WithFieldKeyword}'"); } diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/model-binders/ModelBinders/IQuery.cs b/model-binders/ModelBinders/IQuery.cs index b5f0f58..ab0c2c2 100644 --- a/model-binders/ModelBinders/IQuery.cs +++ b/model-binders/ModelBinders/IQuery.cs @@ -1,5 +1,3 @@ namespace ModelBinders; -public interface IQuery : IDictionary -{ -} \ No newline at end of file +public interface IQuery : IDictionary; \ No newline at end of file diff --git a/model-binders/ModelBinders/ModelOne.cs b/model-binders/ModelBinders/ModelOne.cs index 12d3181..f355afd 100644 --- a/model-binders/ModelBinders/ModelOne.cs +++ b/model-binders/ModelBinders/ModelOne.cs @@ -6,6 +6,4 @@ public class ModelOne(Guid _id, string _name) public string Name => _name; } -public class ModelOnes : Dictionary, IQuery -{ -} \ No newline at end of file +public class ModelOnes : Dictionary, IQuery; \ No newline at end of file diff --git a/model-binders/ModelBinders/ModelTwo.cs b/model-binders/ModelBinders/ModelTwo.cs index 942186f..823054c 100644 --- a/model-binders/ModelBinders/ModelTwo.cs +++ b/model-binders/ModelBinders/ModelTwo.cs @@ -6,6 +6,4 @@ public class ModelTwo(Guid _id, string _name) public string Name => _name; } -public class ModelTwos : Dictionary, IQuery -{ -} \ No newline at end of file +public class ModelTwos : Dictionary, IQuery; \ No newline at end of file diff --git a/unit-testing/UnitTesting/UnitTesting.csproj b/unit-testing/UnitTesting/UnitTesting.csproj index 89f79ba..56d1cd7 100644 --- a/unit-testing/UnitTesting/UnitTesting.csproj +++ b/unit-testing/UnitTesting/UnitTesting.csproj @@ -1,6 +1,7 @@ + Exe false true @@ -8,6 +9,8 @@ + + @@ -15,10 +18,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive -