Skip to content

Commit

Permalink
yeet FluentAssertions (#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 authored Jan 25, 2025
1 parent bb58d71 commit 52c2f0d
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 32 deletions.
3 changes: 0 additions & 3 deletions test/Discord.Net.Tests.Integration/ChannelsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
using Discord.API.Rest;
using Discord.Net;
using Discord.Rest;
using FluentAssertions;
using System;
using System.IO;
using System.Threading.Tasks;
using Xunit;

using Shouldly;

namespace Discord;

[CollectionDefinition(nameof(DiscordRestApiClientTests), DisableParallelization = true)]
Expand Down Expand Up @@ -47,7 +48,7 @@ public async Task UploadFile_WithOverSize_ThrowsException()
Func<Task> upload = async () =>
await _apiClient.UploadFileAsync(_channel.Id, new UploadFileParams(new FileAttachment(stream, "filename")));

await upload.Should().ThrowExactlyAsync<HttpException>()
.Where(e => e.DiscordCode == DiscordErrorCode.RequestEntityTooLarge);
var exception = await upload.ShouldThrowAsync<HttpException>();
exception.DiscordCode.ShouldBe(DiscordErrorCode.RequestEntityTooLarge);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Discord.Rest;
using System;
using Xunit;

namespace Discord
{
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Integration/GuildTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xunit;
using Xunit.Abstractions;
Expand Down
3 changes: 0 additions & 3 deletions test/Discord.Net.Tests.Integration/RestGuildFixture.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using Discord.Rest;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Discord
{
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/ColorTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/CommandBuilderTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using Discord;
using System;
using Xunit;

namespace Discord;
Expand Down
1 change: 0 additions & 1 deletion test/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<ProjectReference Include="../../src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/EmoteTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
3 changes: 0 additions & 3 deletions test/Discord.Net.Tests.Unit/FormatTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
1 change: 0 additions & 1 deletion test/Discord.Net.Tests.Unit/GuildHelperTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Discord.Rest;
using NSubstitute;
using System;
using Xunit;

Expand Down
1 change: 0 additions & 1 deletion test/Discord.Net.Tests.Unit/GuildPermissionsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/MentionUtilsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/SnowflakeUtilsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
2 changes: 0 additions & 2 deletions test/Discord.Net.Tests.Unit/TokenUtilsTests.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Discord
Expand Down
1 change: 0 additions & 1 deletion test/Discord.Net.Tests.Unit/TypeReaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Discord.Commands;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xunit;

Expand Down

0 comments on commit 52c2f0d

Please sign in to comment.