Skip to content

Commit e3bbb11

Browse files
committed
Add unit test for MessageReceiptRepository instantiation
1 parent 8ed379a commit e3bbb11

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2014-2025 Stream.io Inc. All rights reserved.
3+
*
4+
* Licensed under the Stream License;
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://github.com/GetStream/stream-chat-android/blob/main/LICENSE
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.getstream.chat.android.client.persistence.repository
18+
19+
import io.getstream.chat.android.client.persistence.db.ChatClientDatabase
20+
import io.getstream.chat.android.client.persistence.db.dao.MessageReceiptDao
21+
import org.junit.Test
22+
import org.junit.jupiter.api.Assertions.assertNotNull
23+
import org.mockito.kotlin.doReturn
24+
import org.mockito.kotlin.mock
25+
26+
internal class MessageReceiptRepositoryTest {
27+
28+
@Test
29+
fun `should instantiate MessageReceiptRepository`() {
30+
val mockDatabase = mock<ChatClientDatabase> {
31+
on { messageReceiptDao() } doReturn mock<MessageReceiptDao>()
32+
}
33+
34+
val actual = MessageReceiptRepository(mockDatabase)
35+
36+
assertNotNull(actual)
37+
}
38+
}

0 commit comments

Comments
 (0)