Skip to content

Commit 16f4174

Browse files
committed
remove FluentAssertions
1 parent a58ce66 commit 16f4174

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

test/AspNetCore.SecurityKey.Tests/SecurityKeyExtractorTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public void ExtraKeyFromHeader()
2121

2222
var extractedKey = securityKeyExtractor.GetKey(httpContext);
2323

24-
extractedKey.Should().NotBeNull();
25-
extractedKey.Should().Be("test-security-key");
24+
Assert.NotNull(extractedKey);
25+
Assert.Equal("test-security-key", extractedKey);
2626
}
2727

2828
[Fact]
@@ -41,8 +41,8 @@ public void ExtraKeyFromQuery()
4141

4242
var extractedKey = securityKeyExtractor.GetKey(httpContext);
4343

44-
extractedKey.Should().NotBeNull();
45-
extractedKey.Should().Be("test-security-key");
44+
Assert.NotNull(extractedKey);
45+
Assert.Equal("test-security-key", extractedKey);
4646
}
4747

4848
[Fact]
@@ -62,9 +62,9 @@ public void ExtraKeyFromHeaderPriority()
6262

6363
var extractedKey = securityKeyExtractor.GetKey(httpContext);
6464

65-
extractedKey.Should().NotBeNull();
65+
Assert.NotNull(extractedKey);
6666

6767
// should use header first
68-
extractedKey.Should().Be("test-security-header");
68+
Assert.Equal("test-security-header", extractedKey);
6969
}
7070
}

test/AspNetCore.SecurityKey.Tests/SecurityKeyValidatorTests.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ public async Task ValidateSecurityKey()
3030
var validator = new SecurityKeyValidator(configuration, options, logger);
3131

3232
var result = await validator.Validate("test");
33-
result.Should().BeFalse();
33+
Assert.False(result);
3434

3535
result = await validator.Validate("this-is-test");
36-
result.Should().BeTrue();
36+
Assert.True(result);
3737

3838
result = await validator.Validate("another-test");
39-
result.Should().BeTrue();
39+
Assert.True(result);
4040
}
4141

4242
[Fact]
@@ -63,10 +63,10 @@ public async Task ValidateSecurityKeyCaseAsync()
6363
var validator = new SecurityKeyValidator(configuration, options, logger);
6464

6565
var result = await validator.Validate("this-is-test");
66-
result.Should().BeTrue();
66+
Assert.True(result);
6767

6868
result = await validator.Validate("THIS-IS-TEST");
69-
result.Should().BeFalse();
69+
Assert.False(result);
7070
}
7171

7272
[Fact]
@@ -87,12 +87,12 @@ public async Task ValidateNoKeyFound()
8787
var validator = new SecurityKeyValidator(configuration, options, logger);
8888

8989
var result = await validator.Validate("test");
90-
result.Should().BeFalse();
90+
Assert.False(result);
9191

9292
result = await validator.Validate("this-is-test");
93-
result.Should().BeFalse();
93+
Assert.False(result);
9494

9595
result = await validator.Validate("another-test");
96-
result.Should().BeFalse();
96+
Assert.False(result);
9797
}
9898
}

test/Directory.Build.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@
3232
<ItemGroup>
3333
<PackageReference Include="AssemblyMetadata.Generators" Version="2.1.0" PrivateAssets="All" />
3434
<PackageReference Include="Bogus" Version="35.6.1" />
35-
<PackageReference Include="FluentAssertions" Version="8.0.1" />
3635
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
3736
<PackageReference Include="XUnit.Hosting" Version="2.0.0" />
3837
</ItemGroup>
3938

4039
<ItemGroup>
41-
<Using Include="FluentAssertions" />
4240
<Using Include="Xunit" />
4341
<Using Include="Xunit.Abstractions" />
4442
</ItemGroup>

0 commit comments

Comments
 (0)