mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 19:58:49 +00:00
Compare commits
8 Commits
cc94905930
...
99e0bef64d
Author | SHA1 | Date | |
---|---|---|---|
99e0bef64d | |||
db3a80b6da | |||
52c85f3498 | |||
f679ec294e | |||
6750f0e3db | |||
8380b9e063 | |||
2b5c13300a | |||
e6b165645b |
6
.github/workflows/sonarcloud.yml
vendored
6
.github/workflows/sonarcloud.yml
vendored
@ -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 }}"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/oliverbooth/X10D/actions/workflows/dotnet.yml"><img src="https://img.shields.io/github/actions/workflow/status/oliverbooth/X10D/dotnet.yml?style=flat-square" alt="GitHub Workflow Status" title="GitHub Workflow Status"></a>
|
||||
<a href="https://github.com/oliverbooth/X10D/issues"><img src="https://img.shields.io/github/issues/oliverbooth/X10D?style=flat-square" alt="GitHub Issues" title="GitHub Issues"></a>
|
||||
<a href="https://sonarcloud.io/dashboard?id=oliverbooth_X10D"><img src="https://img.shields.io/sonar/coverage/oliverbooth_X10D?server=https%3A%2F%2Fsonarcloud.io&style=flat-square" alt="Coverage"></a>
|
||||
<a href="https://sonarcloud.io/dashboard?id=X10D"><img src="https://img.shields.io/sonar/coverage/X10D?server=https%3A%2F%2Fsonarcloud.io&style=flat-square" alt="Coverage"></a>
|
||||
<a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/dt/X10D?style=flat-square" alt="NuGet Downloads" title="NuGet Downloads"></a>
|
||||
<a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/v/X10D?label=stable&style=flat-square" alt="Stable Version" title="Stable Version"></a>
|
||||
<a href="https://www.nuget.org/packages/X10D/"><img src="https://img.shields.io/nuget/vpre/X10D?label=nightly&style=flat-square" alt="Nightly Version" title="Nightly Version"></a>
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user