test: テストの型エラーを修正

This commit is contained in:
usbharu 2023-08-08 17:58:28 +09:00
parent 7eb9e914bd
commit 3764d476c0
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
2 changed files with 54 additions and 54 deletions

View File

@ -35,7 +35,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -45,7 +45,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -53,7 +53,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -101,7 +101,7 @@ class PostsTest {
on { getClaim(eq("uid")) } doReturn claim
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -111,7 +111,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -119,7 +119,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -127,7 +127,7 @@ class PostsTest {
url = "https://example.com/posts/2"
),
PostResponse(
id = 1234567,
id = "1234567",
user = user,
text = "Followers only",
visibility = Visibility.FOLLOWERS,
@ -176,7 +176,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -185,7 +185,7 @@ class PostsTest {
createdAt = Instant.now().toEpochMilli()
)
val post = PostResponse(
id = 12345,
id = "12345",
user = user,
text = "aaa",
visibility = Visibility.PUBLIC,
@ -216,9 +216,9 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val post = PostResponse(
12345,
"12345",
UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -279,9 +279,9 @@ class PostsTest {
val argument = it.getArgument<dev.usbharu.hideout.domain.model.hideout.form.Post>(0)
val userId = it.getArgument<Long>(1)
PostResponse(
id = 123L,
id = "123",
user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -335,7 +335,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -345,7 +345,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -353,7 +353,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -396,7 +396,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -406,7 +406,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -414,7 +414,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -457,7 +457,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -467,7 +467,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -475,7 +475,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -518,7 +518,7 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -528,7 +528,7 @@ class PostsTest {
)
val posts = listOf(
PostResponse(
id = 12345,
id = "12345",
user = user,
text = "test1",
visibility = Visibility.PUBLIC,
@ -536,7 +536,7 @@ class PostsTest {
url = "https://example.com/posts/1"
),
PostResponse(
id = 123456,
id = "123456",
user = user,
text = "test2",
visibility = Visibility.PUBLIC,
@ -579,9 +579,9 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val post = PostResponse(
id = 123456,
id = "123456",
user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -619,9 +619,9 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val post = PostResponse(
id = 123456,
id = "123456",
user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -659,9 +659,9 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val post = PostResponse(
id = 123456,
id = "123456",
user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",
@ -699,9 +699,9 @@ class PostsTest {
config = ApplicationConfig("empty.conf")
}
val post = PostResponse(
id = 123456,
id = "123456",
user = UserResponse(
id = 54321,
id = "54321",
name = "user1",
domain = "example.com",
screenName = "user 1",

View File

@ -35,7 +35,7 @@ class UsersTest {
val users = listOf(
UserResponse(
12345,
"12345",
"test1",
"example.com",
"test",
@ -44,7 +44,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
12343,
"12343",
"tes2",
"example.com",
"test",
@ -149,7 +149,7 @@ class UsersTest {
config = ApplicationConfig("empty.conf")
}
val userResponse = UserResponse(
1234,
"1234",
"test1",
"example.com",
"test",
@ -182,7 +182,7 @@ class UsersTest {
config = ApplicationConfig("empty.conf")
}
val userResponse = UserResponse(
1234,
"1234",
"test1",
"example.com",
"test",
@ -215,7 +215,7 @@ class UsersTest {
config = ApplicationConfig("empty.conf")
}
val userResponse = UserResponse(
1234,
"1234",
"test1",
"example.com",
"test",
@ -248,7 +248,7 @@ class UsersTest {
config = ApplicationConfig("empty.conf")
}
val userResponse = UserResponse(
1234,
"1234",
"test1",
"example.com",
"test",
@ -283,7 +283,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -292,7 +292,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",
@ -328,7 +328,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -337,7 +337,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",
@ -373,7 +373,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -382,7 +382,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",
@ -425,7 +425,7 @@ class UsersTest {
val userApiService = mock<IUserApiService> {
onBlocking { findByAcct(any()) } doReturn UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -475,7 +475,7 @@ class UsersTest {
val userApiService = mock<IUserApiService> {
onBlocking { findByAcct(any()) } doReturn UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -525,7 +525,7 @@ class UsersTest {
val userApiService = mock<IUserApiService> {
onBlocking { findById(any()) } doReturn UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -568,7 +568,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -577,7 +577,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",
@ -613,7 +613,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -622,7 +622,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",
@ -658,7 +658,7 @@ class UsersTest {
val followers = listOf(
UserResponse(
1235,
"1235",
"follower1",
"example.com",
"test",
@ -667,7 +667,7 @@ class UsersTest {
Instant.now().toEpochMilli()
),
UserResponse(
1236,
"1236",
"follower2",
"example.com",
"test",