|
|
|
@ -36,6 +36,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "json");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var jsonData = await GlobalCache.WrapAsync("mention-specs-output-json", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -45,7 +47,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var jsonData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(jsonData);
|
|
|
|
|
|
|
|
|
|
var json = Json.Parse(jsonData);
|
|
|
|
@ -81,6 +85,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "html");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var htmlData = await GlobalCache.WrapAsync("mention-specs-output-html", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -90,7 +96,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var htmlData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(htmlData);
|
|
|
|
|
|
|
|
|
|
var html = Html.Parse(htmlData);
|
|
|
|
@ -110,6 +118,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "json");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var jsonData = await GlobalCache.WrapAsync("mention-specs-output-json", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -119,7 +129,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var jsonData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(jsonData);
|
|
|
|
|
|
|
|
|
|
var json = Json.Parse(jsonData);
|
|
|
|
@ -148,6 +160,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "html");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var htmlData = await GlobalCache.WrapAsync("mention-specs-output-html", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -157,7 +171,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var htmlData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(htmlData);
|
|
|
|
|
|
|
|
|
|
var html = Html.Parse(htmlData);
|
|
|
|
@ -176,6 +192,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "json");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var jsonData = await GlobalCache.WrapAsync("mention-specs-output-json", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -185,7 +203,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var jsonData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(jsonData);
|
|
|
|
|
|
|
|
|
|
var json = Json.Parse(jsonData);
|
|
|
|
@ -214,6 +234,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "html");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var htmlData = await GlobalCache.WrapAsync("mention-specs-output-html", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -223,7 +245,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var htmlData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(htmlData);
|
|
|
|
|
|
|
|
|
|
var html = Html.Parse(htmlData);
|
|
|
|
@ -242,6 +266,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "json");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var jsonData = await GlobalCache.WrapAsync("mention-specs-output-json", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -251,7 +277,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var jsonData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(jsonData);
|
|
|
|
|
|
|
|
|
|
var json = Json.Parse(jsonData);
|
|
|
|
@ -280,6 +308,8 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
var outputFilePath = Path.ChangeExtension(_tempOutput.GetTempFilePath(), "html");
|
|
|
|
|
|
|
|
|
|
// Act
|
|
|
|
|
var htmlData = await GlobalCache.WrapAsync("mention-specs-output-html", async () =>
|
|
|
|
|
{
|
|
|
|
|
await new ExportChannelsCommand
|
|
|
|
|
{
|
|
|
|
|
TokenValue = Secrets.DiscordToken,
|
|
|
|
@ -289,7 +319,9 @@ namespace DiscordChatExporter.Cli.Tests
|
|
|
|
|
OutputPath = outputFilePath
|
|
|
|
|
}.ExecuteAsync(new FakeConsole());
|
|
|
|
|
|
|
|
|
|
var htmlData = await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
return await File.ReadAllTextAsync(outputFilePath);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
_testOutput.WriteLine(htmlData);
|
|
|
|
|
|
|
|
|
|
var html = Html.Parse(htmlData);
|
|
|
|
|