Skip to content

Commit dcd6b80

Browse files
committed
Update test dependencies
1 parent fd83266 commit dcd6b80

File tree

5 files changed

+31
-44
lines changed

5 files changed

+31
-44
lines changed

tests/DynamoDBGenerator.SourceGenerator.Benchmarks/DynamoDBGenerator.SourceGenerator.Benchmarks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<ItemGroup>
1212
<PackageReference Include="AutoFixture" Version="4.18.1" />
13-
<PackageReference Include="BenchmarkDotNet" Version="0.13.6" />
13+
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

tests/DynamoDBGenerator.SourceGenerator.Tests/DynamoDBDocumentTests/Marshaller/Tuples/SimpleTupleTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ private static ((string, string, string? ), Dictionary<string, AttributeValue>)
3030
[InlineData(null, null, null, "FirstName")]
3131
[InlineData(null, "ABC", null, "FirstName")]
3232
[InlineData("ABC", null, null, "LastName")]
33-
public void Marshall_NullField_Throws(string firstName, string lastName, string? emailAddress, string dataMember)
33+
public void Marshall_NullField_Throws(string? firstName, string? lastName, string? emailAddress, string dataMember)
3434
{
35-
var (valueTuple, _) = Av((firstName, lastName, emailAddress));
35+
var (valueTuple, _) = Av((firstName!, lastName!, emailAddress));
3636

3737
var act = () => ValueTupleMarshaller.Marshall(valueTuple);
3838
act.Should().Throw<DynamoDBMarshallingException>().Which.MemberName.Should().Be(dataMember);
@@ -42,9 +42,9 @@ public void Marshall_NullField_Throws(string firstName, string lastName, string?
4242
[InlineData(null, null, null, "FirstName")]
4343
[InlineData(null, "ABC", null, "FirstName")]
4444
[InlineData("ABC", null, null, "LastName")]
45-
public void Unmarshall_NullField_Throws(string firstName, string lastName, string? emailAddress, string dataMember)
45+
public void Unmarshall_NullField_Throws(string? firstName, string? lastName, string? emailAddress, string? dataMember)
4646
{
47-
var (_, _attributeValues) = Av((firstName, lastName, emailAddress));
47+
var (_, _attributeValues) = Av((firstName!, lastName!, emailAddress));
4848

4949
var act = () => ValueTupleMarshaller.Unmarshall(_attributeValues);
5050
act.Should().Throw<DynamoDBMarshallingException>().Which.MemberName.Should().Be(dataMember);

tests/DynamoDBGenerator.SourceGenerator.Tests/DynamoDBDocumentTests/Serialize/NullableAnnotationTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public partial class NullableAnnotationTests
1414
[InlineData("1", null, "3")]
1515
[InlineData(null, null, "3")]
1616
public void Serialize_NestedGenericWith_NullabilityCheckNotThrows(
17-
string disabledNullableReferenceType,
18-
string enabledNullableReferenceType,
17+
string? disabledNullableReferenceType,
18+
string? enabledNullableReferenceType,
1919
string enabledNoneNullableReferenceType)
2020
{
2121
var @class = new NestedNullableAnnotationTestClass
@@ -35,15 +35,15 @@ public void Serialize_NestedGenericWith_NullabilityCheckNotThrows(
3535
[InlineData(null, "2", null)]
3636
[InlineData(null, null, null)]
3737
public void Serialize_NestedGenericWith_NullabilityCheckThrows(
38-
string disabledNullableReferenceType,
39-
string enabledNullableReferenceType,
40-
string enabledNoneNullableReferenceType)
38+
string? disabledNullableReferenceType,
39+
string? enabledNullableReferenceType,
40+
string? enabledNoneNullableReferenceType)
4141
{
4242
var @class = new NestedNullableAnnotationTestClass
4343
{
4444
DisabledNullableReferenceType = (1, disabledNullableReferenceType),
4545
EnabledNullableReferenceType = (1, enabledNullableReferenceType),
46-
EnabledNoneNullableReferenceType = (1, enabledNoneNullableReferenceType)
46+
EnabledNoneNullableReferenceType = (1, enabledNoneNullableReferenceType!)
4747
};
4848

4949
var result = () => NestedNullableAnnotationTestClassMarshaller.Marshall(@class);
@@ -64,17 +64,17 @@ public void Serialize_NestedGenericWith_NullabilityCheckThrows(
6464
[InlineData(1, null, null, null, true)]
6565
public void Serialize_With_NullabilityChecks(
6666
int? nullableValueType,
67-
string disabledNullableReferenceType,
68-
string enabledNullableReferenceType,
69-
string enabledNoneNullableReferenceType,
67+
string? disabledNullableReferenceType,
68+
string? enabledNullableReferenceType,
69+
string? enabledNoneNullableReferenceType,
7070
bool shouldThrow)
7171
{
7272
var @class = new NullableAnnotationTestClass
7373
{
7474
NullableValueType = nullableValueType,
7575
DisabledNullableReferenceType = disabledNullableReferenceType,
7676
EnabledNullableReferenceType = enabledNullableReferenceType,
77-
EnabledNoneNullableReferenceType = enabledNoneNullableReferenceType
77+
EnabledNoneNullableReferenceType = enabledNoneNullableReferenceType!
7878
};
7979

8080
var result = () => NullableAnnotationTestClassMarshaller.Marshall(@class);

tests/DynamoDBGenerator.SourceGenerator.Tests/DynamoDBGenerator.SourceGenerator.Tests.csproj

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,19 @@
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
9+
<NuGetAudit>false</NuGetAudit>
910
</PropertyGroup>
1011

1112
<ItemGroup>
12-
<PackageReference Include="AutoFixture" Version="4.18.0" />
13-
<PackageReference Include="FluentAssertions" Version="6.10.0" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
15-
<PackageReference Include="xunit" Version="2.4.1" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
17-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
18-
<PrivateAssets>all</PrivateAssets>
19-
</PackageReference>
20-
<PackageReference Include="coverlet.collector" Version="3.1.2">
21-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22-
<PrivateAssets>all</PrivateAssets>
23-
</PackageReference>
13+
<PackageReference Include="AutoFixture" Version="4.18.1"/>
14+
<PackageReference Include="FluentAssertions" Version="7.0.0"/>
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
16+
<PackageReference Include="xunit" Version="2.9.2"/>
2417
</ItemGroup>
2518

2619
<ItemGroup>
27-
<ProjectReference Include="..\..\src\DynamoDBGenerator.SourceGenerator\DynamoDBGenerator.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
28-
<ProjectReference Include="..\..\src\DynamoDBGenerator\DynamoDBGenerator.csproj" />
29-
30-
31-
20+
<ProjectReference Include="..\..\src\DynamoDBGenerator.SourceGenerator\DynamoDBGenerator.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
21+
<ProjectReference Include="..\..\src\DynamoDBGenerator\DynamoDBGenerator.csproj"/>
3222
</ItemGroup>
33-
34-
35-
36-
23+
3724
</Project>

tests/DynamoDBGenerator.SourceGenerator.Tests/DynamoDBPrimaryKeyMarshallerTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ public void RangeKey_TypeWithPartitionKeyOnly_ShouldThrow()
4141
[InlineData(null, "abc")]
4242
[InlineData(null, null)]
4343
[InlineData("abc", "dfg")]
44-
public void Keys_TypeWithPartitionKeyOnly_ShouldThrow(string partitionKey, string rangeKey)
44+
public void Keys_TypeWithPartitionKeyOnly_ShouldThrow(string? partitionKey, string? rangeKey)
4545
{
46-
var act = () => PartitionKeyOnly.PrimaryKeyMarshaller.Keys(partitionKey, rangeKey);
46+
var act = () => PartitionKeyOnly.PrimaryKeyMarshaller.Keys(partitionKey!, rangeKey!);
4747
act.Should().Throw<InvalidOperationException>();
4848
}
4949

@@ -69,9 +69,9 @@ public void RangeKey_TypeWithRangeKeyOnly_ShouldThrow()
6969
[InlineData(null, "abc")]
7070
[InlineData(null, null)]
7171
[InlineData("abc", "dfg")]
72-
public void Keys_TypeWithRangeKeyOnly_ShouldThrow(string partitionKey, string rangeKey)
72+
public void Keys_TypeWithRangeKeyOnly_ShouldThrow(string? partitionKey, string? rangeKey)
7373
{
74-
var act = () => TypeWithRangeOnly.PrimaryKeyMarshaller.Keys(partitionKey, rangeKey);
74+
var act = () => TypeWithRangeOnly.PrimaryKeyMarshaller.Keys(partitionKey!, rangeKey!);
7575
act.Should().Throw<InvalidOperationException>();
7676
}
7777

@@ -96,9 +96,9 @@ public void RangeKey_TypeWithoutKeys_ShouldSucceed()
9696
[InlineData(null, "abc")]
9797
[InlineData(null, null)]
9898
[InlineData("abc", "dfg")]
99-
public void Keys_TypeWithoutKeys_ShouldThrow(string partitionKey, string rangeKey)
99+
public void Keys_TypeWithoutKeys_ShouldThrow(string? partitionKey, string? rangeKey)
100100
{
101-
var act = () => TypeWithoutKeys.PrimaryKeyMarshaller.Keys(partitionKey, rangeKey);
101+
var act = () => TypeWithoutKeys.PrimaryKeyMarshaller.Keys(partitionKey!, rangeKey!);
102102
act.Should().Throw<InvalidOperationException>();
103103
}
104104

@@ -152,9 +152,9 @@ public void Keys_ValidTypeWithKeys_ShouldSucceed()
152152
[InlineData("abc", 1)]
153153
[InlineData(1, "abc")]
154154
[InlineData(1, 2)]
155-
public void Keys_InvalidTypesWithKeys_ShouldThrow(object partitionKey, object rangeKey)
155+
public void Keys_InvalidTypesWithKeys_ShouldThrow(object? partitionKey, object? rangeKey)
156156
{
157-
var act = () => TypeWithKeys.PrimaryKeyMarshaller.Keys(partitionKey, rangeKey);
157+
var act = () => TypeWithKeys.PrimaryKeyMarshaller.Keys(partitionKey!, rangeKey!);
158158
act.Should().Throw<DynamoDBMarshallingException>();
159159
}
160160

0 commit comments

Comments
 (0)