Skip to content

Commit 2fd4115

Browse files
committed
adding more tests
updating nuspec
1 parent c922caa commit 2fd4115

4 files changed

Lines changed: 46 additions & 2 deletions

File tree

CleanArchitecture.nuspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<metadata>
44
<id>Ardalis.CleanArchitecture.Template</id>
55
<title>ASP.NET Core Clean Architecture Solution</title>
6-
<version>10.1.1</version>
6+
<version>11.0.0-beta.1</version>
77
<authors>Steve Smith</authors>
88
<description>
99
The Clean Architecture Solution Template popularized by Steve @ardalis Smith. Provides a great starting point for modern and/or DDD solutions built with .NET 8 and C# 12.
@@ -14,7 +14,10 @@
1414
<projectUrl>https://github.com/ardalis/CleanArchitecture</projectUrl>
1515
<releaseNotes>
1616
* Aspire on by default
17-
* Fixes issues with sln/slnx files
17+
* Updated dependencies
18+
* .NET 10
19+
* Vogen
20+
* Mediator.SourceGenerator
1821
</releaseNotes>
1922
<packageTypes>
2023
<packageType name="Template" />

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>net10.0</TargetFramework>
66
<Nullable>enable</Nullable>
77
<ImplicitUsings>enable</ImplicitUsings>
8+
<LangVersion>latest</LangVersion>
89
</PropertyGroup>
910
<PropertyGroup>
1011
<NoWarn>1591</NoWarn> <!-- Remove this to turn on warnings for missing XML Comments -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace Clean.Architecture.UnitTests.Core.ContributorAggregate;
2+
3+
public class ContributorIdFrom
4+
{
5+
[Fact]
6+
public void CreatesGivenValidValue()
7+
{
8+
int validValue = 1;
9+
var contributorId = ContributorId.From(validValue);
10+
Assert.Equal(validValue, contributorId.Value);
11+
}
12+
13+
[Theory]
14+
[InlineData(0)]
15+
[InlineData(-1)]
16+
public void ThrowsGivenInvalidValue(int invalidValue)
17+
{
18+
Assert.Throws<Vogen.ValueObjectValidationException>(() => ContributorId.From(invalidValue));
19+
}
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
namespace Clean.Architecture.UnitTests.Core.ContributorAggregate;
2+
3+
public class ContributorNameFrom
4+
{
5+
[Fact]
6+
public void CreatesGivenValidValue()
7+
{
8+
string validValue = "ardalis";
9+
var contributorName = ContributorName.From(validValue);
10+
Assert.Equal(validValue, contributorName.Value);
11+
}
12+
13+
[Theory]
14+
[InlineData(null)]
15+
[InlineData("")]
16+
public void ThrowsGivenInvalidValue(string? invalidValue)
17+
{
18+
Assert.Throws<Vogen.ValueObjectValidationException>(() => ContributorName.From(invalidValue!));
19+
}
20+
}

0 commit comments

Comments
 (0)