aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-07 22:13:24 +0800
committerGitHub <noreply@github.com>2021-01-07 22:13:24 +0800
commit05132389cd2db33ab3bdeaa2fbfae25fc8db8882 (patch)
treedaaa39d8d1d72b10caaa92cb65ba1635237ef2dc /BackEnd/Timeline.Tests/IntegratedTests/BaseTimelineTest.cs
parent191b92a161c4fdad532dbf471f5c33f8f4a97a23 (diff)
parent0bb2cc098506963ebf9ee06ec94b43c8d388543c (diff)
downloadtimeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.tar.gz
timeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.tar.bz2
timeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.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.cs32
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) };
+ }
+ }
+}