You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using DiscordChatExporter.Cli.Tests.Fixtures;
|
|
|
|
|
using DiscordChatExporter.Cli.Tests.TestData;
|
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace DiscordChatExporter.Cli.Tests.Specs;
|
|
|
|
|
|
|
|
|
|
public class CsvContentSpecs : IClassFixture<ExportWrapperFixture>
|
|
|
|
|
{
|
|
|
|
|
private readonly ExportWrapperFixture _exportWrapper;
|
|
|
|
|
|
|
|
|
|
public CsvContentSpecs(ExportWrapperFixture exportWrapper)
|
|
|
|
|
{
|
|
|
|
|
_exportWrapper = exportWrapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
|
public async Task Messages_are_exported_correctly()
|
|
|
|
|
{
|
|
|
|
|
// Act
|
|
|
|
|
var document = await _exportWrapper.ExportAsCsvAsync(ChannelIds.DateRangeTestCases);
|
|
|
|
|
|
|
|
|
|
// Assert
|
|
|
|
|
document.Should().ContainAll(
|
|
|
|
|
"Tyrrrz#5447",
|
|
|
|
|
"Hello world",
|
|
|
|
|
"Goodbye world",
|
|
|
|
|
"Foo bar",
|
|
|
|
|
"Hurdle Durdle",
|
|
|
|
|
"One",
|
|
|
|
|
"Two",
|
|
|
|
|
"Three",
|
|
|
|
|
"Yeet"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|