2021-09-08 10:36:25 -04:00
|
|
|
|
using System.Threading.Tasks;
|
2023-02-11 16:12:15 -05:00
|
|
|
|
using DiscordChatExporter.Cli.Tests.Infra;
|
2021-09-08 10:36:25 -04:00
|
|
|
|
using FluentAssertions;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
2023-02-06 08:57:08 -05:00
|
|
|
|
namespace DiscordChatExporter.Cli.Tests.Specs;
|
2021-12-08 16:50:21 -05:00
|
|
|
|
|
2023-02-09 11:44:24 -05:00
|
|
|
|
public class CsvContentSpecs
|
2021-09-08 10:36:25 -04:00
|
|
|
|
{
|
2021-12-08 16:50:21 -05:00
|
|
|
|
[Fact]
|
2023-05-20 00:09:19 -04:00
|
|
|
|
public async Task I_can_export_a_channel_in_the_CSV_format()
|
2021-09-08 10:36:25 -04:00
|
|
|
|
{
|
2021-12-08 16:50:21 -05:00
|
|
|
|
// Act
|
2023-02-11 16:12:15 -05:00
|
|
|
|
var document = await ExportWrapper.ExportAsCsvAsync(ChannelIds.DateRangeTestCases);
|
2021-09-08 10:36:25 -04:00
|
|
|
|
|
2021-12-08 16:50:21 -05:00
|
|
|
|
// Assert
|
2023-08-22 14:17:19 -04:00
|
|
|
|
document
|
|
|
|
|
.Should()
|
|
|
|
|
.ContainAll(
|
|
|
|
|
"tyrrrz",
|
|
|
|
|
"Hello world",
|
|
|
|
|
"Goodbye world",
|
|
|
|
|
"Foo bar",
|
|
|
|
|
"Hurdle Durdle",
|
|
|
|
|
"One",
|
|
|
|
|
"Two",
|
|
|
|
|
"Three",
|
|
|
|
|
"Yeet"
|
|
|
|
|
);
|
2021-09-08 10:36:25 -04:00
|
|
|
|
}
|
2023-08-22 14:17:19 -04:00
|
|
|
|
}
|