From 4e1eef61bdc7f976ec102f13c7aa021ab66531ef Mon Sep 17 00:00:00 2001 From: Sefer Mirza <36925434+SeferMirza@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:01:18 +0300 Subject: [PATCH 1/4] init 'issue/dotnet-10/mtp' --- .gitignore | 3 --- Directory.Build.props | 1 + global.json | 5 +++++ unit-testing/UnitTesting/UnitTesting.csproj | 6 ++---- 4 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 global.json diff --git a/.gitignore b/.gitignore index 894a117e..2b1cbbb4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,9 +18,6 @@ bld/ # visual studio code .vscode/ -# dotnet sdk -global.json - # generated file **/Generated/**/*.cs **/.benchmark/** diff --git a/Directory.Build.props b/Directory.Build.props index 5f334afa..9e894bee 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -10,6 +10,7 @@ true true true + true diff --git a/global.json b/global.json new file mode 100644 index 00000000..3140116d --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/unit-testing/UnitTesting/UnitTesting.csproj b/unit-testing/UnitTesting/UnitTesting.csproj index 89f79baf..64dbd6bf 100644 --- a/unit-testing/UnitTesting/UnitTesting.csproj +++ b/unit-testing/UnitTesting/UnitTesting.csproj @@ -1,6 +1,7 @@ + Exe false true @@ -8,6 +9,7 @@ + @@ -15,10 +17,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - From 22e4bd687a29effa2eac96e1f8ee15d28bd10efb Mon Sep 17 00:00:00 2001 From: Sefer Mirza <36925434+SeferMirza@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:06:16 +0300 Subject: [PATCH 2/4] fix typo --- csharp/CSharp/PropertiesAndFields.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/CSharp/PropertiesAndFields.cs b/csharp/CSharp/PropertiesAndFields.cs index 6261d4fb..c8f03382 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}'"); } From de2ea3c2cb9afa66b571576d0bfc1b933bb257e3 Mon Sep 17 00:00:00 2001 From: Sefer Mirza <36925434+SeferMirza@users.noreply.github.com> Date: Fri, 6 Mar 2026 18:09:22 +0300 Subject: [PATCH 3/4] add coverage --- .github/workflows/project-regular-checks.yml | 8 +++++++- .gitignore | 1 + Directory.Packages.props | 2 ++ unit-testing/UnitTesting/UnitTesting.csproj | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/project-regular-checks.yml b/.github/workflows/project-regular-checks.yml index 168a25f7..11282ce5 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 2b1cbbb4..fd954be8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ bld/ **/Generated/**/*.cs **/.benchmark/** **/**/*.dll +.coverage/ # generated schemas **/*.schema.json diff --git a/Directory.Packages.props b/Directory.Packages.props index a36a3912..a17c9494 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -27,6 +27,8 @@ + + diff --git a/unit-testing/UnitTesting/UnitTesting.csproj b/unit-testing/UnitTesting/UnitTesting.csproj index 64dbd6bf..56d1cd75 100644 --- a/unit-testing/UnitTesting/UnitTesting.csproj +++ b/unit-testing/UnitTesting/UnitTesting.csproj @@ -10,6 +10,7 @@ + From 089a0bcd2d95b95efd16f877d14af38fd629c534 Mon Sep 17 00:00:00 2001 From: Sefer Mirza <36925434+SeferMirza@users.noreply.github.com> Date: Sat, 7 Mar 2026 12:57:44 +0300 Subject: [PATCH 4/4] remove empty braces --- model-binders/ModelBinders/IQuery.cs | 4 +--- model-binders/ModelBinders/ModelOne.cs | 4 +--- model-binders/ModelBinders/ModelTwo.cs | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/model-binders/ModelBinders/IQuery.cs b/model-binders/ModelBinders/IQuery.cs index b5f0f58f..ab0c2c23 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 12d31819..f355afd9 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 942186f6..823054c3 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