More test stuff

This commit is contained in:
Oleksii Holub
2022-06-30 19:07:11 +03:00
parent 565fb53d3b
commit 057902f919
9 changed files with 173 additions and 62 deletions

View File

@@ -31,7 +31,7 @@ public class AttachmentSpecs : IClassFixture<ExportWrapperFixture>
var attachments = message.GetProperty("attachments").EnumerateArray().ToArray();
attachments.Should().HaveCount(1);
attachments.Single().GetProperty("url").GetString().Should().StartWith(
attachments.Single().GetProperty("url").GetString().Should().Be(
"https://cdn.discordapp.com/attachments/885587741654536192/885587844964417596/Test.txt"
);
attachments.Single().GetProperty("fileName").GetString().Should().Be("Test.txt");
@@ -52,7 +52,7 @@ public class AttachmentSpecs : IClassFixture<ExportWrapperFixture>
var attachments = message.GetProperty("attachments").EnumerateArray().ToArray();
attachments.Should().HaveCount(1);
attachments.Single().GetProperty("url").GetString().Should().StartWith(
attachments.Single().GetProperty("url").GetString().Should().Be(
"https://cdn.discordapp.com/attachments/885587741654536192/885654862430359613/bird-thumbnail.png"
);
attachments.Single().GetProperty("fileName").GetString().Should().Be("bird-thumbnail.png");
@@ -73,7 +73,7 @@ public class AttachmentSpecs : IClassFixture<ExportWrapperFixture>
var attachments = message.GetProperty("attachments").EnumerateArray().ToArray();
attachments.Should().HaveCount(1);
attachments.Single().GetProperty("url").GetString().Should().StartWith(
attachments.Single().GetProperty("url").GetString().Should().Be(
"https://cdn.discordapp.com/attachments/885587741654536192/885655761512968233/file_example_MP4_640_3MG.mp4"
);
attachments.Single().GetProperty("fileName").GetString().Should().Be("file_example_MP4_640_3MG.mp4");
@@ -94,7 +94,7 @@ public class AttachmentSpecs : IClassFixture<ExportWrapperFixture>
var attachments = message.GetProperty("attachments").EnumerateArray().ToArray();
attachments.Should().HaveCount(1);
attachments.Single().GetProperty("url").GetString().Should().StartWith(
attachments.Single().GetProperty("url").GetString().Should().Be(
"https://cdn.discordapp.com/attachments/885587741654536192/885656175348187146/file_example_MP3_1MG.mp3"
);
attachments.Single().GetProperty("fileName").GetString().Should().Be("file_example_MP3_1MG.mp3");

View File

@@ -33,7 +33,8 @@ public class MentionSpecs : IClassFixture<ExportWrapperFixture>
.GetProperty("mentions")
.EnumerateArray()
.Select(j => j.GetProperty("id").GetString())
.Should().Contain("128178626683338752");
.Should()
.Contain("128178626683338752");
}
[Fact]