Skip to content

Commit

Permalink
Remove Discord URLs from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d4n3436 committed Mar 3, 2024
1 parent 0c18698 commit 36a5bb0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion tests/Fergun.Tests/Apis/BingVisualSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public async Task ReverseImageSearchAsync_Returns_Results(string url, BingSafeSe
}

[Theory]
[InlineData("https://cdn.discordapp.com/attachments/838832564583661638/954475252027641886/tts.mp3")] // MP3 file
[InlineData("https://upload.wikimedia.org/wikipedia/commons/2/29/Suru_Bog_10000px.jpg")] // 10000px image
[InlineData("https://simpl.info/bigimage/bigImage.jpg")] // 91 MB file
public async Task ReverseImageSearchAsync_Throws_BingException_If_Image_Is_Invalid(string url)
Expand Down
4 changes: 1 addition & 3 deletions tests/Fergun.Tests/Apis/GoogleLensTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class GoogleLensTests
private readonly IGoogleLensClient _googleLens = new GoogleLensClient();

[Theory]
[InlineData("https://cdn.discordapp.com/attachments/838832564583661638/954474328324460544/lorem_ipsum.png")]
[InlineData("https://upload.wikimedia.org/wikipedia/commons/0/01/Windows_fonts_most_used.jpg")]
[InlineData("https://upload.wikimedia.org/wikipedia/commons/5/57/Lorem_Ipsum_Helvetica.png")]
public async Task OcrAsync_Returns_Text(string url)
{
Expand All @@ -23,7 +23,6 @@ public async Task OcrAsync_Returns_Text(string url)
}

[Theory]
[InlineData("https://cdn.discordapp.com/attachments/838832564583661638/954475252027641886/tts.mp3")] // MP3 file
[InlineData("https://upload.wikimedia.org/wikipedia/commons/2/29/Suru_Bog_10000px.jpg")] // 10000px image
[InlineData("https://simpl.info/bigimage/bigImage.jpg")] // 91 MB file
public async Task OcrAsync_Throws_GoogleLensException_If_Image_Is_Invalid(string url)
Expand Down Expand Up @@ -51,7 +50,6 @@ public async Task ReverseImageSearchAsync_Returns_Results(string url, string? la
}

[Theory]
[InlineData("https://cdn.discordapp.com/attachments/838832564583661638/954475252027641886/tts.mp3")] // MP3 file
[InlineData("https://upload.wikimedia.org/wikipedia/commons/2/29/Suru_Bog_10000px.jpg")] // 10000px image
[InlineData("https://simpl.info/bigimage/bigImage.jpg")] // 91 MB file
public async Task ReverseImageSearchAsync_Throws_GoogleLensException_If_Image_Is_Invalid(string url)
Expand Down
2 changes: 1 addition & 1 deletion tests/Fergun.Tests/Apis/YandexImageSearchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class YandexImageSearchTests
private readonly IYandexImageSearch _yandexImageSearch = new YandexImageSearch();

[Theory]
[InlineData("https://cdn.discordapp.com/attachments/838832564583661638/954474328324460544/lorem_ipsum.png")]
[InlineData("https://upload.wikimedia.org/wikipedia/commons/0/01/Windows_fonts_most_used.jpg")]
[InlineData("https://upload.wikimedia.org/wikipedia/commons/5/57/Lorem_Ipsum_Helvetica.png")]
public async Task OcrAsync_Returns_Text(string url)
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Fergun.Tests/Modules/ImageModuleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ public async Task ReverseAsync_Sends_Paginator(string? url, IAttachment? file, R
}

[Theory]
[InlineData("", null, ReverseImageSearchEngine.Bing, true, false, "NoResults")]
[InlineData("", null, ReverseImageSearchEngine.Yandex, true, true, "NoResults")]
[InlineData("", null, ReverseImageSearchEngine.Bing, true, false, "UrlNotWellFormed")]
[InlineData("", null, ReverseImageSearchEngine.Yandex, true, true, "UrlNotWellFormed")]
[InlineData(null, null, ReverseImageSearchEngine.Bing, false, true, "UrlOrAttachmentRequired")]
[InlineData(null, null, ReverseImageSearchEngine.Yandex, false, true, "UrlOrAttachmentRequired")]
public async Task ReverseAsync_Returns_No_Results(string? url, IAttachment? file, ReverseImageSearchEngine engine, bool multiImages, bool nsfw, string message)
Expand All @@ -165,7 +165,7 @@ public async Task ReverseAsync_Returns_No_Results(string? url, IAttachment? file
[Fact]
public async Task ReverseAsync_Throws_Exception_If_Invalid_Engine_Is_Passed()
{
await Assert.ThrowsAsync<ArgumentException>("engine", () => _module.ReverseAsync("", It.IsAny<IAttachment>(), (ReverseImageSearchEngine)3, It.IsAny<bool>()));
await Assert.ThrowsAsync<ArgumentException>("engine", () => _module.ReverseAsync("https://example.com/image.png", It.IsAny<IAttachment>(), (ReverseImageSearchEngine)3, It.IsAny<bool>()));
}

[Theory]
Expand Down

0 comments on commit 36a5bb0

Please sign in to comment.