Skip to content

Commit 9fa4527

Browse files
committed
Feat: Update assertions and package dependencies
Modified test assertions for stronger null checks by casting to `object` where necessary. Upgraded multiple package dependencies, including `Microsoft.Extensions.DependencyInjection` and `CodeOfChaos.GeneratorTools`, to ensure compatibility and improved functionality.
1 parent cd577c1 commit 9fa4527

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/CodeOfChaos.CliArgsParser.Generators.Sample/CodeOfChaos.CliArgsParser.Generators.Sample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<ProjectReference Include="..\CodeOfChaos.CliArgsParser\CodeOfChaos.CliArgsParser.csproj"/>
1313

1414
<!-- Ugly, but this is because of some weirdness with how analyzers are imported through a project reference -->
15-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.1" GeneratePathProperty="true" PrivateAssets="all"/>
15+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.7.1" GeneratePathProperty="true" PrivateAssets="all" />
1616
<Analyzer Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll"/>
1717
</ItemGroup>
1818

src/CodeOfChaos.CliArgsParser.Generators/CodeOfChaos.CliArgsParser.Generators.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" PrivateAssets="all" />
4040
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.13.0" PrivateAssets="all" />
4141
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" PrivateAssets="all" />
42-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.1" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
42+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.7.1" Pack="true" GeneratePathProperty="true" PrivateAssets="all" />
4343
</ItemGroup>
4444
<ItemGroup>
4545
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />

src/CodeOfChaos.CliArgsParser.Library/CodeOfChaos.CliArgsParser.Library.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<ProjectReference Include="..\CodeOfChaos.CliArgsParser\CodeOfChaos.CliArgsParser.csproj" />
3535

3636
<!-- Ugly, but this is because of some weirdness with how analyzers are imported through a project reference -->
37-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.1" GeneratePathProperty="true" PrivateAssets="all" />
37+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.7.1" GeneratePathProperty="true" PrivateAssets="all" />
3838
<Analyzer Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll" />
3939
</ItemGroup>
4040

src/Tools.CodeOfChaos.CliArgsParser/Tools.CodeOfChaos.CliArgsParser.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3"/>
12+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
1313
</ItemGroup>
1414

1515
<ItemGroup>
1616
<ProjectReference Include="..\CodeOfChaos.CliArgsParser.Library\CodeOfChaos.CliArgsParser.Library.csproj"/>
1717
<ProjectReference Include="..\CodeOfChaos.CliArgsParser\CodeOfChaos.CliArgsParser.csproj"/>
1818

1919
<!-- Ugly, but this is because of some weirdness with how analyzers are imported through a project reference -->
20-
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.4.1" GeneratePathProperty="true" PrivateAssets="all"/>
20+
<PackageReference Include="CodeOfChaos.GeneratorTools" Version="1.7.1" GeneratePathProperty="true" PrivateAssets="all" />
2121
<Analyzer Include="$(PkgCodeOfChaos_GeneratorTools)\lib\netstandard2.0\*.dll"/>
2222
</ItemGroup>
2323

tests/Tests.CodeOfChaos.CliArgsParser/Tests.CodeOfChaos.CliArgsParser.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<ItemGroup>
1313
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0"/>
1414
<PackageReference Include="Moq" Version="4.20.72"/>
15-
<PackageReference Include="TUnit" Version="0.18.26"/>
16-
<PackageReference Include="Bogus" Version="35.6.2"/>
15+
<PackageReference Include="TUnit" Version="0.19.86" />
16+
<PackageReference Include="Bogus" Version="35.6.3" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

tests/Tests.CodeOfChaos.CliArgsParser/UserInputRegistryTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public async Task Test_IngestString_ParsesFlags(string input) {
5353
bool flag = registry.GetParameter<bool>("--flag");
5454

5555
// Assert
56-
await Assert.That(flag).IsNotNull().Because("The parameter should exist");
56+
await Assert.That(flag as object).IsNotNull().Because("The parameter should exist");
5757
await Assert.That(flag).IsEqualTo(true);
5858
}
5959

@@ -160,7 +160,7 @@ public async Task Test_IngestString_ParsesComplexInputWithMixedArguments() {
160160
await Assert.That(key2).IsNotNull().Because("The parameter 'key2' should exist");
161161
await Assert.That(key2).IsEqualTo("value2");
162162

163-
await Assert.That(shortFlag).IsNotNull().Because("The flag '-f' should be a valid boolean value");
163+
await Assert.That(shortFlag as object).IsNotNull().Because("The flag '-f' should be a valid boolean value");
164164
await Assert.That(shortFlag).IsEqualTo(true);
165165

166166
await Assert.That(quotedString).IsNotNull().Because("The quoted string should be parsed correctly");
@@ -172,10 +172,10 @@ public async Task Test_IngestString_ParsesComplexInputWithMixedArguments() {
172172
await Assert.That(positional1).IsNotNull().Because("The second positional argument should exist");
173173
await Assert.That(positional1).IsEqualTo("arg2");
174174

175-
await Assert.That(boolFlag).IsNotNull().Because("The boolean flag 'boolFlag' should exist");
175+
await Assert.That(boolFlag as object).IsNotNull().Because("The boolean flag 'boolFlag' should exist");
176176
await Assert.That(boolFlag).IsEqualTo(true);
177177

178-
await Assert.That(negativeFlag).IsNotNull().Because("The boolean flag 'negativeFlag' should exist");
178+
await Assert.That(negativeFlag as object).IsNotNull().Because("The boolean flag 'negativeFlag' should exist");
179179
await Assert.That(negativeFlag).IsEqualTo(false);
180180
}
181181

0 commit comments

Comments
 (0)