Reorder tests

This commit is contained in:
Tyrrrz 2024-01-18 20:25:30 +02:00
parent d8e43d89be
commit 014712b747

View file

@ -90,31 +90,6 @@ public class FilterSpecs
.AllBe("This has image");
}
[Fact]
public async Task I_can_filter_the_export_to_only_include_messages_that_contain_guild_invites()
{
// Arrange
using var file = TempFile.Create();
// Act
await new ExportChannelsCommand
{
Token = Secrets.DiscordToken,
ChannelIds = [ChannelIds.FilterTestCases],
ExportFormat = ExportFormat.Json,
OutputPath = file.Path,
MessageFilter = MessageFilter.Parse("has:invite")
}.ExecuteAsync(new FakeConsole());
// Assert
Json.Parse(await File.ReadAllTextAsync(file.Path))
.GetProperty("messages")
.EnumerateArray()
.Select(j => j.GetProperty("content").GetString())
.Should()
.AllBe("This has invite");
}
[Fact]
public async Task I_can_filter_the_export_to_only_include_messages_that_have_been_pinned()
{
@ -140,6 +115,31 @@ public class FilterSpecs
.AllBe("This is pinned");
}
[Fact]
public async Task I_can_filter_the_export_to_only_include_messages_that_contain_guild_invites()
{
// Arrange
using var file = TempFile.Create();
// Act
await new ExportChannelsCommand
{
Token = Secrets.DiscordToken,
ChannelIds = [ChannelIds.FilterTestCases],
ExportFormat = ExportFormat.Json,
OutputPath = file.Path,
MessageFilter = MessageFilter.Parse("has:invite")
}.ExecuteAsync(new FakeConsole());
// Assert
Json.Parse(await File.ReadAllTextAsync(file.Path))
.GetProperty("messages")
.EnumerateArray()
.Select(j => j.GetProperty("content").GetString())
.Should()
.AllBe("This has invite");
}
[Fact]
public async Task I_can_filter_the_export_to_only_include_messages_that_contain_the_specified_mention()
{