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

View File

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