diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 356e513..f9c2eea 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + fetch-depth: 0 - name: Cache SonarCloud packages uses: actions/cache@v3 @@ -51,11 +51,11 @@ jobs: - name: Build and analyze env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"oliverbooth_X10D" /o:"oliverbooth" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" + .\.sonar\scanner\dotnet-sonarscanner begin /k:"X10D" /o:"oliverbooth" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html dotnet build --no-incremental dotnet dotcover test --dcReportType=HTML .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" diff --git a/README.md b/README.md index 8bd1047..30b3e51 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

GitHub Workflow Status GitHub Issues -Coverage +Coverage NuGet Downloads Stable Version Nightly Version diff --git a/X10D.Tests/src/Time/DateOnlyTests.cs b/X10D.Tests/src/Time/DateOnlyTests.cs index 15b10ce..25dc25d 100644 --- a/X10D.Tests/src/Time/DateOnlyTests.cs +++ b/X10D.Tests/src/Time/DateOnlyTests.cs @@ -39,6 +39,18 @@ internal class DateOnlyTests Assert.That(age, Is.EqualTo(18)); } + [Test] + public void Deconstruct_ShouldDeconstruct_GivenDateOnly() + { + var date = new DateOnly(2017, 12, 31); + + date.Deconstruct(out int year, out int month, out int day); + + Assert.That(year, Is.EqualTo(2017)); + Assert.That(month, Is.EqualTo(12)); + Assert.That(day, Is.EqualTo(31)); + } + [Test] public void Deconstruct_ShouldDeconstructToTuple_GivenDateOnly() {