diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..f6310b7f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tests +on: + push: + branches: [ "main", release-*, develop ] + pull_request: + branches: [ "main", release-*, develop ] + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of commits + submodules: 'true' + + - name: Setup .NET Core + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + + - name: Run FishyFlip.Tests + run: dotnet test src/FishyFlip.Tests/FishyFlip.Tests.csproj -- --report-trx --results-directory ../../dotnet-test-results + + - name: Run WhiteWindLib.Tests + run: dotnet test src/WhiteWindLib.Tests/WhiteWindLib.Tests.csproj -- --report-trx --results-directory ../../dotnet-test-results + + - name: Upload Test Results + uses: actions/upload-artifact@v4 + with: + name: dotnet-test-results + path: dotnet-test-results + if: ${{ always() }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1603c7eb..f10c293e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. +dotnet-test-results/ whitewindlib.runsettings fishyflip.runsettings external/Drastic.FlipperKit/build/ diff --git a/src/FishyFlip.Tests/AuthorizedTests.cs b/src/FishyFlip.Auth.Tests/AuthorizedTests.cs similarity index 79% rename from src/FishyFlip.Tests/AuthorizedTests.cs rename to src/FishyFlip.Auth.Tests/AuthorizedTests.cs index c35b29d9..1f88ebe1 100644 --- a/src/FishyFlip.Tests/AuthorizedTests.cs +++ b/src/FishyFlip.Auth.Tests/AuthorizedTests.cs @@ -12,19 +12,6 @@ namespace FishyFlip.Tests; public class AuthorizedTests { static ATProtocol proto; - static string handle; - static string handle_2; - static string did; - static string did_2; - static string post_thread; - static string quote_post; - static string quote_post_2; - static string feed_generator; - static string follow_did; - static string block_did; - static string media_post; - static string images_post; - static string external_post; public AuthorizedTests() { @@ -33,20 +20,7 @@ public AuthorizedTests() [ClassInitialize] public static void ClassInitialize(TestContext context) { - feed_generator = "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot"; - follow_did = "did:plc:nrfz3bngz57p7g7yg6pbkyqr"; - block_did = "did:plc:nrfz3bngz57p7g7yg6pbkyqr"; - media_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46xtosyvf2y"; - images_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46tcntvgy2a"; - external_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46sr63j7r2m"; - handle = (string?)context.Properties["BLUESKY_TEST_HANDLE"] ?? throw new ArgumentNullException(); - handle_2 = "peepthisbot.bsky.social"; - - did = "did:plc:nrfz3bngz57p7g7yg6pbkyqr"; - did_2 = "did:plc:okblbaji7rz243bluudjlgxt"; - post_thread = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l5bialwzz52f"; - quote_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxmjdxlpl2r"; - quote_post_2 = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxdo7r2cj2m"; + string handle = (string?)context.Properties["BLUESKY_TEST_HANDLE"] ?? throw new ArgumentNullException(); string password = (string?)context.Properties["BLUESKY_TEST_PASSWORD"] ?? throw new ArgumentNullException(); string instance = "https://bsky.social"; var debugLog = new DebugLoggerProvider(); @@ -55,7 +29,7 @@ public static void ClassInitialize(TestContext context) .WithInstanceUrl(new Uri(instance)) .WithLogger(debugLog.CreateLogger("FishyFlipTests")); AuthorizedTests.proto = atProtocolBuilder.Build(); - AuthorizedTests.proto.AuthenticateWithPasswordAsync(AuthorizedTests.handle, password).Wait(); + AuthorizedTests.proto.AuthenticateWithPasswordAsync(handle, password).Wait(); } [TestMethod] @@ -74,9 +48,10 @@ public async Task GetPopularFeedGeneratorsAsync() } [TestMethod] - public async Task GetFeedAsyncTest() + [DataRow("at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot")] + public async Task GetFeedAsyncTest(string feedGenerator) { - var atUri = ATUri.Create(AuthorizedTests.feed_generator); + var atUri = ATUri.Create(feedGenerator); var result = await AuthorizedTests.proto.Feed.GetFeedAsync(atUri); result.Switch( success => @@ -90,9 +65,10 @@ public async Task GetFeedAsyncTest() } [TestMethod] - public async Task GetFeedGeneratorAsyncTest() + [DataRow("at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot")] + public async Task GetFeedGeneratorAsyncTest(string feedGenerator) { - var atUri = ATUri.Create(AuthorizedTests.feed_generator); + var atUri = ATUri.Create(feedGenerator); var result = await AuthorizedTests.proto.Feed.GetFeedGeneratorAsync(atUri); result.Switch( success => @@ -106,13 +82,14 @@ public async Task GetFeedGeneratorAsyncTest() } [TestMethod] - public async Task GetProfileAsyncTest() + [DataRow("drasticactions.xn--q9jyb4c")] + public async Task GetProfileAsyncTest(string handle1) { - var result = await AuthorizedTests.proto.Actor.GetProfileAsync(ATHandle.Create(AuthorizedTests.handle) ?? throw new ArgumentNullException(nameof(AuthorizedTests.handle))); + var result = await AuthorizedTests.proto.Actor.GetProfileAsync(ATHandle.Create(handle1) ?? throw new ArgumentNullException(nameof(handle1))); result.Switch( success => { - Assert.AreEqual(success!.Handle, AuthorizedTests.handle); + Assert.AreEqual(success!.Handle, handle1); }, failed => { @@ -121,14 +98,15 @@ public async Task GetProfileAsyncTest() } [TestMethod] - public async Task GetProfilesAsyncWithHandlesTest() + [DataRow("drasticactions.xn--q9jyb4c", "peepthisbot.bsky.social")] + public async Task GetProfilesAsyncWithHandlesTest(string handle1, string handle2) { - var result = await AuthorizedTests.proto.Actor.GetProfilesAsync(new[] { ATHandle.Create(AuthorizedTests.handle), ATHandle.Create(AuthorizedTests.handle_2) }); + var result = await AuthorizedTests.proto.Actor.GetProfilesAsync(new[] { ATHandle.Create(handle1), ATHandle.Create(handle2) }); result.Switch( success => { - Assert.AreEqual(AuthorizedTests.handle, success!.Profiles[0]!.Handle.ToString()); - Assert.AreEqual(AuthorizedTests.handle_2.ToString(), success!.Profiles[1]!.Handle.ToString()); + Assert.AreEqual(handle1, success!.Profiles[0]!.Handle.ToString()); + Assert.AreEqual(handle2, success!.Profiles[1]!.Handle.ToString()); }, failed => { @@ -137,10 +115,11 @@ public async Task GetProfilesAsyncWithHandlesTest() } [TestMethod] - public async Task GetProfilesAsyncWithDidTest() + [DataRow("did:plc:nrfz3bngz57p7g7yg6pbkyqr", "did:plc:okblbaji7rz243bluudjlgxt")] + public async Task GetProfilesAsyncWithDidTest(string did1, string did2) { - var test1did = ATDid.Create(AuthorizedTests.did); - var test2did = ATDid.Create(AuthorizedTests.did_2); + var test1did = ATDid.Create(did1); + var test2did = ATDid.Create(did2); var result = await AuthorizedTests.proto.Actor.GetProfilesAsync(new[] { test1did, test2did }); result.Switch( success => @@ -155,10 +134,11 @@ public async Task GetProfilesAsyncWithDidTest() } [TestMethod] - public async Task GetPostsAsyncTest() + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxmjdxlpl2r", "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxdo7r2cj2m")] + public async Task GetPostsAsyncTest(string quotePost, string quotePost2) { - var postUri = ATUri.Create(AuthorizedTests.quote_post); - var postUri2 = ATUri.Create(AuthorizedTests.quote_post_2); + var postUri = ATUri.Create(quotePost); + var postUri2 = ATUri.Create(quotePost2); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostsAsync(new[] { postUri, postUri2 }); postThreadResult.Switch( success => @@ -173,9 +153,10 @@ public async Task GetPostsAsyncTest() } [TestMethod] - public async Task GetPostThreadAsyncTest() + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l5bialwzz52f")] + public async Task GetPostThreadAsyncTest(string postThread) { - var postUri = ATUri.Create(AuthorizedTests.post_thread); + var postUri = ATUri.Create(postThread); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => @@ -183,21 +164,22 @@ public async Task GetPostThreadAsyncTest() Assert.AreEqual(postUri.ToString(), success!.Thread.Post!.Uri.ToString()); }, failed => - { - Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); - }); + { + Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); + }); } [TestMethod] - public async Task GetQuotePostThreadAsyncTest() + [DataRow("", "")] + public async Task GetQuotePostThreadAsyncTest(string quotePost, string quotePost2) { - var postUri = ATUri.Create(AuthorizedTests.quote_post); + var postUri = ATUri.Create(quotePost); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => { Assert.AreEqual(postUri.ToString(), success!.Thread.Post!.Uri.ToString()); - Assert.AreEqual(AuthorizedTests.quote_post_2, ((RecordViewEmbed)success!.Thread!.Post!.Embed!)!.Post.Uri.ToString()); + Assert.AreEqual(quotePost2, ((RecordViewEmbed)success!.Thread!.Post!.Embed!)!.Post.Uri.ToString()); }, failed => { @@ -206,9 +188,10 @@ public async Task GetQuotePostThreadAsyncTest() } [TestMethod] - public async Task GetExternalPostThreadAsyncTest() + [DataRow("")] + public async Task GetExternalPostThreadAsyncTest(string externalPost) { - var postUri = ATUri.Create(AuthorizedTests.external_post); + var postUri = ATUri.Create(externalPost); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => @@ -222,9 +205,10 @@ public async Task GetExternalPostThreadAsyncTest() } [TestMethod] - public async Task GetImagesPostThreadAsyncTest() + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46tcntvgy2a")] + public async Task GetImagesPostThreadAsyncTest(string imagesPost) { - var postUri = ATUri.Create(AuthorizedTests.images_post); + var postUri = ATUri.Create(imagesPost); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => @@ -238,9 +222,10 @@ public async Task GetImagesPostThreadAsyncTest() } [TestMethod] - public async Task GetRecordWithMediaPostThreadAsyncTest() + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46xtosyvf2y")] + public async Task GetRecordWithMediaPostThreadAsyncTest(string mediaPost) { - var postUri = ATUri.Create(AuthorizedTests.media_post); + var postUri = ATUri.Create(mediaPost); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => @@ -254,9 +239,10 @@ public async Task GetRecordWithMediaPostThreadAsyncTest() } [TestMethod] - public async Task GetRepliesPostThreadAsyncTest() + [DataRow("")] + public async Task GetRepliesPostThreadAsyncTest(string postThread) { - var postUri = ATUri.Create(AuthorizedTests.post_thread); + var postUri = ATUri.Create(postThread); var postThreadResult = await AuthorizedTests.proto.Feed.GetPostThreadAsync(postUri); postThreadResult.Switch( success => @@ -361,7 +347,8 @@ public async Task CreatePostWithTagAsyncTest() } [TestMethod] - public async Task CreateAndRemoveListTest() + [DataRow("did:plc:nrfz3bngz57p7g7yg6pbkyqr")] + public async Task CreateAndRemoveListTest(string followDid) { var randomName = Guid.NewGuid().ToString(); var createList = (await AuthorizedTests.proto.Repo.CreateCurateListAsync(randomName, "Test List", DateTime.UtcNow)).HandleResult(); @@ -373,7 +360,7 @@ public async Task CreateAndRemoveListTest() Assert.IsTrue(lists is not null); Assert.IsTrue(lists!.Lists.Count() > 0); - var follow1 = ATDid.Create(AuthorizedTests.follow_did); + var follow1 = ATDid.Create(followDid); var follow = (await AuthorizedTests.proto.Repo.CreateListItemAsync(follow1, createList.Uri)).HandleResult(); Assert.IsTrue(follow!.Cid is not null); Assert.IsTrue(follow!.Uri is not null); @@ -442,9 +429,10 @@ public async Task CreateAndRemoveLikeTest() } [TestMethod] - public async Task CreateAndRemoveFollowTest() + [DataRow("did:plc:nrfz3bngz57p7g7yg6pbkyqr")] + public async Task CreateAndRemoveFollowTest(string followDid) { - var follow1 = ATDid.Create(AuthorizedTests.follow_did); + var follow1 = ATDid.Create(followDid); var follow = (await AuthorizedTests.proto.Repo.CreateFollowAsync(follow1)).HandleResult(); Assert.IsTrue(follow!.Cid is not null); Assert.IsTrue(follow!.Uri is not null); @@ -454,9 +442,10 @@ public async Task CreateAndRemoveFollowTest() } [TestMethod] - public async Task CreateAndRemoveBlockTest() + [DataRow("did:plc:nrfz3bngz57p7g7yg6pbkyqr")] + public async Task CreateAndRemoveBlockTest(string blockDid) { - var follow2 = ATDid.Create(AuthorizedTests.block_did); + var follow2 = ATDid.Create(blockDid); var follow = (await AuthorizedTests.proto.Repo.CreateBlockAsync(follow2)).HandleResult(); Assert.IsTrue(follow!.Cid is not null); Assert.IsTrue(follow!.Uri is not null); diff --git a/src/FishyFlip.Auth.Tests/FishyFlip.Auth.Tests.csproj b/src/FishyFlip.Auth.Tests/FishyFlip.Auth.Tests.csproj new file mode 100644 index 00000000..6c6a77bc --- /dev/null +++ b/src/FishyFlip.Auth.Tests/FishyFlip.Auth.Tests.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + enable + enable + false + true + true + + + + $(MSBuildProjectDirectory)\fishyflip.runsettings + + + + + + + + + + + diff --git a/src/FishyFlip.Auth.Tests/GlobalUsings.cs b/src/FishyFlip.Auth.Tests/GlobalUsings.cs new file mode 100644 index 00000000..d6b21ee2 --- /dev/null +++ b/src/FishyFlip.Auth.Tests/GlobalUsings.cs @@ -0,0 +1,25 @@ +// +// Copyright (c) Drastic Actions. All rights reserved. +// + +global using System.IdentityModel.Tokens.Jwt; +global using System.Net.Http.Headers; +global using System.Net.WebSockets; +global using System.Text; +global using System.Text.Encodings; +global using System.Text.Json; +global using System.Text.Json.Serialization; +global using System.Text.RegularExpressions; +global using System.Timers; +global using FishyFlip.Events; +global using FishyFlip.Models; +global using FishyFlip.Models.Internal; +global using FishyFlip.Tools; +global using FishyFlip.Tools.Cbor; +global using FishyFlip.Tools.Json; +global using Ipfs; +global using Microsoft.Extensions.Logging; +global using Microsoft.IdentityModel.Tokens; +global using Microsoft.Testing; +global using Microsoft.VisualStudio.TestTools.UnitTesting; +global using PeterO.Cbor; diff --git a/src/FishyFlip.Auth.Tests/README.md b/src/FishyFlip.Auth.Tests/README.md new file mode 100644 index 00000000..11300bfe --- /dev/null +++ b/src/FishyFlip.Auth.Tests/README.md @@ -0,0 +1,3 @@ +# FishyFlip.Tests + +To run the tests, create a copy of `fishyflip.runsettings.sample` and rename it `fishyflip.runsettings`. Then, fill in the handle name and password fields. \ No newline at end of file diff --git a/src/FishyFlip.Auth.Tests/Samples.cs b/src/FishyFlip.Auth.Tests/Samples.cs new file mode 100644 index 00000000..8d0f122b --- /dev/null +++ b/src/FishyFlip.Auth.Tests/Samples.cs @@ -0,0 +1,10 @@ +// +// Copyright (c) Drastic Actions. All rights reserved. +// + +namespace FishyFlip.Tests; + +internal static class Samples +{ + public static string Base64Image => @"iVBORw0KGgoAAAANSUhEUgAAAHYAAAB2CAMAAAAqeZcjAAAACGFjVEwAAAAHAAAAADttHAAAAAEOUExURQAAAAAAAP8oAMiBWuqZbdmOZP8yAP79AZ1lRrJyT/ejcQEBm4tYPHVPKmg/KstzSfr79gECcFU0IkouEs5dMjYjD55JJ3cxFa5hPEcPBevjBt4cAMcYAJiQBvAgACsPBvn3J58UARsSBXQMAM3FBP5MFeXdxBsjrQwBABkEAfb2RUdEPl5cWDEuLA8JArq9r6Gjmc3Tx3dzY4GDeyMfHe6HVwQAAAIBOWJoyRAODH+EzFVYpJqe2dfQKj9GwcHF7zY7nR4aQ9GsP+uUC3x2ofPRJQcEAC8yfBkXFJ2TcsQ0DAEAGz87XOGykgAACtw9GhILIQoJCAUEBAYIBOdFAXpbewAABAMJEQAEAAoOFJFOgqsAAAABdFJOUwBA5thmAAAAGmZjVEwAAAAAAAAAdgAAAHYAAAAAAAAAAAAKAGQAAMBLGCAAAAASdEVYdFNvZnR3YXJlAGV6Z2lmLmNvbaDDs1gA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WZq8Sj4sYYUPw/ZHRoiDxJJXAgytf/0TVvNY29LvsK/wRcwgzyHUatU5xZ5I/5donBtnd6eoIeIM5wdaFxGgPvfu0f3CG3xMqbvCRp1n0C5Spsw9SRHZ7xaXTd7PwWXhnKkRCGyVKSuXQXCQ2MJx32LTCGmlS0RWQinF/gN3NrKbw48brVRQHztpBNluuZTLLN3xKMft+r8cRKPsq52Wj52RRO+ly2S/gG3GDYXz0BXEO34+PoNZJp0FqG7reScO3YjG7GwqFih/DnL/d7/Cx1lG+xrpF4+gMTsHQ9E9/7JuueGqfNtkcXWaZ9MAj22LzeOqT4Nnl4a0IRfYwD0d8Btu0iszbHTuszNMU3hy6P14CFgVc3xhwxkphlhytxc9Ym9uCxqS6AQIZWUy/Xl0cdPKt6fa3Nn92yzdWXattBm3bJuehJtrn/4TbhHjIN7NbgegG0CXR5WP+K94tsky3Hkf671/AfJ7wYDjRt0GNvkUytC1iB+JzEts6wNjOQ5FJTWlsSd766oJl/8Y6Wcsa8PuZPfumYyvZ82brMQ34n9nsC/Vt1Bxzq/VqTS1ts1aua/8A2LeF33xWR40AAAAASUVORK5CYII="; +} diff --git a/src/FishyFlip.Tests/fishyflip.runsettings.sample b/src/FishyFlip.Auth.Tests/fishyflip.runsettings.sample similarity index 100% rename from src/FishyFlip.Tests/fishyflip.runsettings.sample rename to src/FishyFlip.Auth.Tests/fishyflip.runsettings.sample diff --git a/src/FishyFlip.Tests/AnonymousTests.cs b/src/FishyFlip.Tests/AnonymousTests.cs index 31bdebb0..5d97913e 100644 --- a/src/FishyFlip.Tests/AnonymousTests.cs +++ b/src/FishyFlip.Tests/AnonymousTests.cs @@ -3,6 +3,7 @@ // using FishyFlip.Models; +using FishyFlip.Tools; using Microsoft.Extensions.Logging.Debug; using Microsoft.VisualStudio.TestTools.UnitTesting; using static FishyFlip.Tools.CarDecoder; @@ -13,23 +14,10 @@ namespace FishyFlip.Tests; public class AnonymousTests { static ATProtocol proto; - static string did; - static string media_post; - static string images_post; - static string external_post; - static string quote_post; - static string post_thread; [ClassInitialize] public static void ClassInitialize(TestContext context) { - // drasticactions.xn--q9jyb4c - did = "did:plc:okblbaji7rz243bluudjlgxt"; - images_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3kv25q57gcs2k"; - media_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46xtosyvf2y"; - external_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46sr63j7r2m"; - post_thread = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3kv25q4gqbk2y"; - quote_post = "at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxcq7bwwo2j"; string instance = "https://bsky.social"; var debugLog = new DebugLoggerProvider(); var atProtocolBuilder = new ATProtocolBuilder() @@ -40,85 +28,78 @@ public static void ClassInitialize(TestContext context) } [TestMethod] - public async Task GetPostRecordTest() + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3kv25q4gqbk2y", "")] + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3knxcq7bwwo2j", Constants.EmbedTypes.Record)] + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46sr63j7r2m", Constants.EmbedTypes.External)] + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3kv25q57gcs2k", Constants.EmbedTypes.Images)] + [DataRow("at://did:plc:okblbaji7rz243bluudjlgxt/app.bsky.feed.post/3l46xtosyvf2y", Constants.EmbedTypes.Video)] + public async Task TestPostAsync(string atUri, string embedType) { - var postUri = ATUri.Create(post_thread); + var postUri = ATUri.Create(atUri); var post = await AnonymousTests.proto.Repo.GetPostAsync(postUri.Did!, postUri.Rkey); post.Switch( success => { Assert.AreEqual(postUri.ToString(), success!.Uri!.ToString()); - }, - failed => - { - Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); - }); - } - - [TestMethod] - public async Task GetQuotePostRecordTest() - { - var postUri = ATUri.Create(quote_post); - var post = await AnonymousTests.proto.Repo.GetPostAsync(postUri.Did!, postUri.Rkey); - post.Switch( - success => - { - Assert.AreEqual(postUri.ToString().ToString(), success!.Uri!.ToString()); - Assert.IsTrue(success.Value?.Embed is not null); - Assert.AreEqual(Constants.EmbedTypes.Record, success.Value?.Embed?.Type); - }, - failed => - { - Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); - }); - } - - [TestMethod] - public async Task GetExternalPostRecordTest() - { - var postUri = ATUri.Create(external_post); - var post = await AnonymousTests.proto.Repo.GetPostAsync(postUri.Did!, postUri.Rkey); - post.Switch( - success => - { - Assert.AreEqual(postUri.ToString(), success!.Uri!.ToString()); - Assert.IsTrue(success.Value?.Embed is not null); - Assert.AreEqual(Constants.EmbedTypes.External, success.Value?.Embed?.Type); - }, - failed => - { - Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); - }); - } + Assert.IsNotNull(success.Value); + Assert.AreEqual(success.Value.Type, Constants.FeedType.Post); - [TestMethod] - public async Task GetImagesPostRecordTest() - { - var postUri = ATUri.Create(images_post); - var post = await AnonymousTests.proto.Repo.GetPostAsync(postUri.Did!, postUri.Rkey); - post.Switch( - success => - { - Assert.IsTrue(success.Value?.Embed is not null); - Assert.AreEqual(Constants.EmbedTypes.Images, success.Value?.Embed.Type); - }, - failed => - { - Assert.Fail($"{failed.StatusCode}: {failed.Detail}"); - }); - } + if (!string.IsNullOrEmpty(embedType)) + { + Assert.IsNotNull(success.Value.Embed); + Assert.AreEqual(success.Value.Embed.Type, embedType); + switch (success.Value.Embed.Type) + { + case Constants.EmbedTypes.Record: + var recordEmbed = (RecordEmbed)success.Value.Embed; + Assert.IsNotNull(recordEmbed); + Assert.IsNotNull(recordEmbed.Record); + Assert.IsNotNull(recordEmbed.Record.Cid); + Assert.IsNotNull(recordEmbed.Record.Uri); + break; + case Constants.EmbedTypes.External: + var externalEmbed = (ExternalEmbed)success.Value.Embed; + Assert.IsNotNull(externalEmbed); + Assert.IsNotNull(externalEmbed.External); + var external = externalEmbed.External; + Assert.IsTrue(!string.IsNullOrEmpty(external.Description)); + Assert.IsTrue(!string.IsNullOrEmpty(external.Title)); + Assert.IsTrue(!string.IsNullOrEmpty(external.Uri)); + Assert.IsNotNull(external.Thumb); + Assert.IsTrue(!string.IsNullOrEmpty(external.Thumb.MimeType)); + Assert.IsTrue(!string.IsNullOrEmpty(external.Thumb.Type)); + Assert.IsNotNull(external.Thumb.Ref); + Assert.IsNotNull(external.Thumb.Ref.Link); + break; + case Constants.EmbedTypes.Images: + var imagesEmbed = (ImagesEmbed)success.Value.Embed; + Assert.IsNotNull(imagesEmbed); + Assert.IsNotNull(imagesEmbed.Images); + foreach (var image in imagesEmbed.Images) + { + Assert.IsNotNull(image); + image.Image.ThrowIfNull(); + image.Image?.Ref.ThrowIfNull(); + Assert.IsTrue(!string.IsNullOrEmpty(image.Image?.MimeType)); + } - [TestMethod] - public async Task GetRecordWithVideoPostRecordTest() - { - var postUri = ATUri.Create(media_post); - var post = await AnonymousTests.proto.Repo.GetPostAsync(postUri.Did!, postUri.Rkey); - post.Switch( - success => - { - Assert.AreEqual(postUri.ToString(), success!.Uri!.ToString()); - Assert.IsTrue(success.Value?.Embed is not null); - Assert.AreEqual(Constants.EmbedTypes.Video, success.Value?.Embed.Type); + break; + case Constants.EmbedTypes.Video: + var videoEmbed = (VideoEmbed)success.Value.Embed; + Assert.IsNotNull(videoEmbed); + Assert.IsNotNull(videoEmbed.Video); + videoEmbed.Video?.Ref.ThrowIfNull(); + Assert.IsTrue(!string.IsNullOrEmpty(videoEmbed.Video?.MimeType)); + Assert.IsTrue(!string.IsNullOrEmpty(videoEmbed.Video?.Type)); + Assert.IsNotNull(videoEmbed.AspectRatio); + Assert.IsTrue(videoEmbed.AspectRatio.Width > 0); + Assert.IsTrue(videoEmbed.AspectRatio.Height > 0); + break; + default: + Assert.Fail("Type not listed for test."); + break; + } + } }, failed => { @@ -127,7 +108,8 @@ public async Task GetRecordWithVideoPostRecordTest() } [TestMethod] - public async Task DescribeRepoTest() + [DataRow("did:plc:okblbaji7rz243bluudjlgxt")] + public async Task DescribeRepoTest(string did) { var repo = ATDid.Create(did); var describe = (await AnonymousTests.proto.Repo.DescribeRepoAsync(repo)).HandleResult(); diff --git a/src/FishyFlip.Tests/FishyFlip.Tests.csproj b/src/FishyFlip.Tests/FishyFlip.Tests.csproj index 6c6a77bc..4006061f 100644 --- a/src/FishyFlip.Tests/FishyFlip.Tests.csproj +++ b/src/FishyFlip.Tests/FishyFlip.Tests.csproj @@ -9,10 +9,6 @@ true - - $(MSBuildProjectDirectory)\fishyflip.runsettings - - diff --git a/src/FishyFlip.sln b/src/FishyFlip.sln index f07a828b..43663599 100644 --- a/src/FishyFlip.sln +++ b/src/FishyFlip.sln @@ -11,6 +11,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhiteWindLib", "WhiteWindLi EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhiteWindLib.Tests", "WhiteWindLib.Tests\WhiteWindLib.Tests.csproj", "{2E024F2D-D298-4F7C-9644-63C417824128}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FishyFlip.Auth.Tests", "FishyFlip.Auth.Tests\FishyFlip.Auth.Tests.csproj", "{262AB344-8C76-4243-ADBA-01A478A1C10C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WhiteWindLib.Auth.Tests", "WhiteWindLib.Auth.Tests\WhiteWindLib.Auth.Tests.csproj", "{39CDE0DA-3AA1-4713-9B0C-C7EF61534243}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,6 +37,14 @@ Global {2E024F2D-D298-4F7C-9644-63C417824128}.Debug|Any CPU.Build.0 = Debug|Any CPU {2E024F2D-D298-4F7C-9644-63C417824128}.Release|Any CPU.ActiveCfg = Release|Any CPU {2E024F2D-D298-4F7C-9644-63C417824128}.Release|Any CPU.Build.0 = Release|Any CPU + {262AB344-8C76-4243-ADBA-01A478A1C10C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {262AB344-8C76-4243-ADBA-01A478A1C10C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {262AB344-8C76-4243-ADBA-01A478A1C10C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {262AB344-8C76-4243-ADBA-01A478A1C10C}.Release|Any CPU.Build.0 = Release|Any CPU + {39CDE0DA-3AA1-4713-9B0C-C7EF61534243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39CDE0DA-3AA1-4713-9B0C-C7EF61534243}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39CDE0DA-3AA1-4713-9B0C-C7EF61534243}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39CDE0DA-3AA1-4713-9B0C-C7EF61534243}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/WhiteWindLib.Tests/AuthorizedTests.cs b/src/WhiteWindLib.Auth.Tests/AuthorizedTests.cs similarity index 100% rename from src/WhiteWindLib.Tests/AuthorizedTests.cs rename to src/WhiteWindLib.Auth.Tests/AuthorizedTests.cs diff --git a/src/WhiteWindLib.Auth.Tests/GlobalUsings.cs b/src/WhiteWindLib.Auth.Tests/GlobalUsings.cs new file mode 100644 index 00000000..e9eab795 --- /dev/null +++ b/src/WhiteWindLib.Auth.Tests/GlobalUsings.cs @@ -0,0 +1,27 @@ +// +// Copyright (c) Drastic Actions. All rights reserved. +// + +global using System.IdentityModel.Tokens.Jwt; +global using System.Net.Http.Headers; +global using System.Net.WebSockets; +global using System.Text; +global using System.Text.Encodings; +global using System.Text.Json; +global using System.Text.Json.Serialization; +global using System.Text.RegularExpressions; +global using System.Timers; +global using FishyFlip; +global using FishyFlip.Events; +global using FishyFlip.Models; +global using FishyFlip.Models.Internal; +global using FishyFlip.Tools; +global using FishyFlip.Tools.Cbor; +global using FishyFlip.Tools.Json; +global using Ipfs; +global using Microsoft.Extensions.Logging; +global using Microsoft.IdentityModel.Tokens; +global using Microsoft.Testing; +global using Microsoft.VisualStudio.TestTools.UnitTesting; +global using PeterO.Cbor; +global using WhiteWindLib; \ No newline at end of file diff --git a/src/WhiteWindLib.Auth.Tests/README.md b/src/WhiteWindLib.Auth.Tests/README.md new file mode 100644 index 00000000..72fc6b82 --- /dev/null +++ b/src/WhiteWindLib.Auth.Tests/README.md @@ -0,0 +1,3 @@ +# WhiteWindLib.Tests + +To run the tests, create a copy of `whitewindlib.runsettings.sample` and rename it `whitewindlib.runsettings`. Then, fill in the handle name and password fields. \ No newline at end of file diff --git a/src/WhiteWindLib.Auth.Tests/WhiteWindLib.Auth.Tests.csproj b/src/WhiteWindLib.Auth.Tests/WhiteWindLib.Auth.Tests.csproj new file mode 100644 index 00000000..ddc3997a --- /dev/null +++ b/src/WhiteWindLib.Auth.Tests/WhiteWindLib.Auth.Tests.csproj @@ -0,0 +1,25 @@ + + + + net8.0 + enable + enable + false + true + true + + + + $(MSBuildProjectDirectory)\whitewindlib.runsettings + + + + + + + + + + + + diff --git a/src/WhiteWindLib.Tests/whitewindlib.runsettings.sample b/src/WhiteWindLib.Auth.Tests/whitewindlib.runsettings.sample similarity index 100% rename from src/WhiteWindLib.Tests/whitewindlib.runsettings.sample rename to src/WhiteWindLib.Auth.Tests/whitewindlib.runsettings.sample diff --git a/src/WhiteWindLib.Tests/AnonymousTests.cs b/src/WhiteWindLib.Tests/AnonymousTests.cs index 3600c39d..39d01aa0 100644 --- a/src/WhiteWindLib.Tests/AnonymousTests.cs +++ b/src/WhiteWindLib.Tests/AnonymousTests.cs @@ -13,18 +13,12 @@ namespace WhiteWindLib.Tests; [TestClass] public class AnonymousTests { - static string did; - - static string aturi; - static ATProtocol proto; static WhiteWindBlog blog; [ClassInitialize] public static void ClassInitialize(TestContext context) { - did = "did:plc:fzkpgpjj7nki7r5rhtmgzrez"; - aturi = "at://did:plc:fzkpgpjj7nki7r5rhtmgzrez/com.whtwnd.blog.entry/3kudrxp52ps2a"; string instance = "https://bsky.social"; var debugLog = new DebugLoggerProvider(); var atProtocolBuilder = new ATProtocolBuilder() @@ -36,9 +30,10 @@ public static void ClassInitialize(TestContext context) } [TestMethod] - public async Task GetAuthorPostsTest() + [DataRow("did:plc:fzkpgpjj7nki7r5rhtmgzrez")] + public async Task GetAuthorPostsTest(string didString) { - var did = ATDid.Create(AnonymousTests.did); + var did = ATDid.Create(didString); var (result, error) = await blog.GetAuthorEntriesAsync(did!); Assert.IsNull(error); Assert.IsNotNull(result); @@ -46,9 +41,10 @@ public async Task GetAuthorPostsTest() } [TestMethod] - public async Task GetAuthorPostTest() + [DataRow("at://did:plc:fzkpgpjj7nki7r5rhtmgzrez/com.whtwnd.blog.entry/3kudrxp52ps2a")] + public async Task GetAuthorPostTest(string atDid) { - var postUri = ATUri.Create(AnonymousTests.aturi); + var postUri = ATUri.Create(atDid); var (result, error) = await blog.GetEntryAsync(postUri.Did!, postUri.Rkey); Assert.IsNull(error); Assert.IsNotNull(result); diff --git a/src/WhiteWindLib.Tests/WhiteWindLib.Tests.csproj b/src/WhiteWindLib.Tests/WhiteWindLib.Tests.csproj index ddc3997a..497f116a 100644 --- a/src/WhiteWindLib.Tests/WhiteWindLib.Tests.csproj +++ b/src/WhiteWindLib.Tests/WhiteWindLib.Tests.csproj @@ -9,10 +9,6 @@ true - - $(MSBuildProjectDirectory)\whitewindlib.runsettings - -