-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modified SearchMessagesActivityTest.| #1116 * Fixed JUnit tests.| #1116 * Fixed ParcelableTest. Modified Parcelable realization for OutgoingMessageInfo.| #1116
- Loading branch information
Showing
4 changed files
with
47 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,13 @@ import android.os.Build | |
import android.os.Parcel | ||
import android.os.Parcelable | ||
import com.flextrade.jfixture.JFixture | ||
import com.flowcrypt.email.api.email.model.OutgoingMessageInfo | ||
import com.flowcrypt.email.api.retrofit.response.model.node.GenericMsgBlock | ||
import com.flowcrypt.email.api.retrofit.response.model.node.MsgBlock | ||
import com.flowcrypt.email.jfixture.MsgBlockGenerationCustomization | ||
import com.flowcrypt.email.jfixture.SelectConstructorCustomisation | ||
import com.flowcrypt.email.model.MessageEncryptionType | ||
import com.flowcrypt.email.model.MessageType | ||
import io.github.classgraph.ClassGraph | ||
import org.junit.Assert | ||
import org.junit.Assert.assertNotNull | ||
|
@@ -21,6 +24,7 @@ import org.junit.Test | |
import org.junit.runner.RunWith | ||
import org.robolectric.ParameterizedRobolectricTestRunner | ||
import org.robolectric.annotation.Config | ||
import javax.mail.internet.InternetAddress | ||
|
||
/** | ||
* @author Denis Bondarenko | ||
|
@@ -40,6 +44,26 @@ class ParcelableTest(val name: String, private val currentClass: Class<Parcelabl | |
fixture.customise(SelectConstructorCustomisation(currentClass)) | ||
fixture.customise(MsgBlockGenerationCustomization()) | ||
fixture.customise().sameInstance(GenericMsgBlock::class.java, GenericMsgBlock(MsgBlock.Type.UNKNOWN, "someContent", false)) | ||
//todo-denbond7 improve that | ||
fixture.customise().sameInstance(OutgoingMessageInfo::class.java, | ||
OutgoingMessageInfo( | ||
account = "[email protected]", | ||
subject = "subject", | ||
msg = "msg", | ||
toRecipients = listOf(InternetAddress("[email protected]")), | ||
ccRecipients = listOf(InternetAddress("[email protected]")), | ||
bccRecipients = listOf( | ||
InternetAddress("[email protected]"), | ||
InternetAddress("[email protected]")), | ||
from = "[email protected]", | ||
atts = null, | ||
forwardedAtts = listOf(), | ||
encryptionType = MessageEncryptionType.STANDARD, | ||
messageType = MessageType.NEW, | ||
replyToMsgEntity = null, | ||
uid = 1000 | ||
) | ||
) | ||
objectInstance = currentClass.kotlin.objectInstance ?: fixture.create(currentClass) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters