diff options
author | crupest <crupest@outlook.com> | 2021-01-07 22:13:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 22:13:24 +0800 |
commit | 34b2304997bfac1e186dad660ec62d8d87fec75f (patch) | |
tree | 2ca5678d575eae81f71220896a9862468c93fcc3 /BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs | |
parent | e701f8bab033dd364673215e66d58a1cb9fea339 (diff) | |
parent | 04186d5f1091266b85758d4b4255c6a7c1b498f6 (diff) | |
download | timeline-34b2304997bfac1e186dad660ec62d8d87fec75f.tar.gz timeline-34b2304997bfac1e186dad660ec62d8d87fec75f.tar.bz2 timeline-34b2304997bfac1e186dad660ec62d8d87fec75f.zip |
Merge pull request #204 from crupest/back-dev
Timeline info includes highlight and bookmark info.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs new file mode 100644 index 00000000..0bf3b2b2 --- /dev/null +++ b/BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic;
+using System.Threading.Tasks;
+using Timeline.Models.Http;
+
+namespace Timeline.Tests.IntegratedTests
+{
+ public class BaseTimelineTest : IntegratedTestBase
+ {
+ public BaseTimelineTest() : base(3)
+ {
+ }
+
+ protected override async Task OnInitializeAsync()
+ {
+ for (int i = 0; i <= 3; i++)
+ {
+ using var client = await CreateClientAs(i);
+ await client.TestPostAsync("timelines", new TimelineCreateRequest { Name = $"t{i}" });
+ }
+ }
+
+ public static string CreatePersonalTimelineName(int i) => i == 0 ? "@admin" : $"@user{i}";
+ public static string CreateOrdinaryTimelineName(int i) => $"t{i}";
+ public delegate string TimelineNameGenerator(int i);
+
+ public static IEnumerable<object[]> TimelineNameGeneratorTestData()
+ {
+ yield return new object[] { new TimelineNameGenerator(CreatePersonalTimelineName) };
+ yield return new object[] { new TimelineNameGenerator(CreateOrdinaryTimelineName) };
+ }
+ }
+}
|