Skip to content

Commit

Permalink
Renamed MessageDaoSource to MessageDao.| #793
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed Dec 26, 2019
1 parent d860ab2 commit b06a0b3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import androidx.test.rule.ActivityTestRule
import com.flowcrypt.email.R
import com.flowcrypt.email.api.email.MsgsCacheManager
import com.flowcrypt.email.api.email.model.IncomingMessageInfo
import com.flowcrypt.email.database.dao.source.imap.MessageDaoSource
import com.flowcrypt.email.database.dao.source.imap.MessageDao
import com.flowcrypt.email.ui.activity.base.BaseActivity
import com.flowcrypt.email.util.TestGeneralUtil
import com.google.android.material.snackbar.Snackbar
Expand Down Expand Up @@ -176,7 +176,7 @@ abstract class BaseTest {
fun getMsgInfo(path: String, mimeMsgPath: String): IncomingMessageInfo? {
val incomingMsgInfo = TestGeneralUtil.getObjectFromJson(path, IncomingMessageInfo::class.java)
incomingMsgInfo?.generalMsgDetails?.let {
val uri = MessageDaoSource().addRow(getTargetContext(), it) ?: throw IllegalStateException()
val uri = MessageDao().addRow(getTargetContext(), it) ?: throw IllegalStateException()
MsgsCacheManager.addMsg(uri.lastPathSegment
?: throw IllegalStateException(), getContext().assets.open(mimeMsgPath))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package com.flowcrypt.email.rules
import com.flowcrypt.email.api.email.model.LocalFolder
import com.flowcrypt.email.api.email.protocol.OpenStoreHelper
import com.flowcrypt.email.database.dao.source.AccountDao
import com.flowcrypt.email.database.dao.source.imap.MessageDaoSource
import com.flowcrypt.email.database.dao.source.imap.MessageDao
import com.google.android.gms.auth.GoogleAuthException
import com.sun.mail.imap.IMAPFolder
import org.junit.runner.Description
Expand Down Expand Up @@ -66,6 +66,6 @@ class AddMessageToDatabaseRule(val account: AccountDao, val localFolder: LocalFo
}

private fun saveMsgToDatabase() {
MessageDaoSource().addRow(targetContext, account.email, localFolder.fullName, 0, message, false)
MessageDao().addRow(targetContext, account.email, localFolder.fullName, 0, message, false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import com.flowcrypt.email.api.email.model.LocalFolder
import com.flowcrypt.email.api.retrofit.response.model.node.DecryptErrorMsgBlock
import com.flowcrypt.email.api.retrofit.response.model.node.PublicKeyMsgBlock
import com.flowcrypt.email.base.BaseTest
import com.flowcrypt.email.database.dao.source.imap.MessageDaoSource
import com.flowcrypt.email.database.dao.source.imap.MessageDao
import com.flowcrypt.email.matchers.CustomMatchers
import com.flowcrypt.email.matchers.CustomMatchers.Companion.withDrawable
import com.flowcrypt.email.model.KeyDetails
Expand Down Expand Up @@ -93,7 +93,7 @@ class MessageDetailsActivityTest : BaseTest() {
AddAttachmentToDatabaseRule(TestGeneralUtil.getObjectFromJson("messages/attachments/pub_key.json",
AttachmentInfo::class.java)!!)

private val msgDaoSource = MessageDaoSource()
private val msgDaoSource = MessageDao()

@get:Rule
var ruleChain: TestRule = RuleChain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ import com.flowcrypt.email.api.email.model.GeneralMessageDetails
* E-mail: [email protected]
*/

class MessageDaoSource
class MessageDao

0 comments on commit b06a0b3

Please sign in to comment.