mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 18:02:15 -05:00
Remove comments
This commit is contained in:
parent
084e7a1687
commit
af491fdb41
@ -16,10 +16,7 @@ import static junit.framework.Assert.assertTrue;
|
|||||||
|
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class MessageReferenceTest {
|
public class MessageReferenceTest {
|
||||||
/**
|
|
||||||
* Typically happens during forwards. (You have a reference, but no flag since we don't currently consider
|
|
||||||
* FORWARDED a flag.)
|
|
||||||
*/
|
|
||||||
@Test
|
@Test
|
||||||
public void checkIdentityStringFromMessageReferenceWithoutFlag() {
|
public void checkIdentityStringFromMessageReferenceWithoutFlag() {
|
||||||
MessageReference mr = new MessageReference();
|
MessageReference mr = new MessageReference();
|
||||||
@ -30,9 +27,6 @@ public class MessageReferenceTest {
|
|||||||
assertEquals("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=", mr.toIdentityString());
|
assertEquals("!:byBoYWkh:Zm9sZGVy:MTAxMDEwMTA=", mr.toIdentityString());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Typically happens during replies.
|
|
||||||
*/
|
|
||||||
@Test
|
@Test
|
||||||
public void checkIdentityStringFromMessageReferenceWithFlag() {
|
public void checkIdentityStringFromMessageReferenceWithFlag() {
|
||||||
MessageReference mr = new MessageReference();
|
MessageReference mr = new MessageReference();
|
||||||
@ -75,28 +69,23 @@ public class MessageReferenceTest {
|
|||||||
|
|
||||||
@Test(expected = MessagingException.class)
|
@Test(expected = MessagingException.class)
|
||||||
public void parseIdentityStringWithCorruptFlag() throws MessagingException {
|
public void parseIdentityStringWithCorruptFlag() throws MessagingException {
|
||||||
// Corruption in the Flag should throw MessagingException.
|
|
||||||
new MessageReference("!:%^&%^*$&$by&(BYWkh:Zm9%^@sZGVy:MT-35#$AxMDEwMTA=:ANSWE!RED");
|
new MessageReference("!:%^&%^*$&$by&(BYWkh:Zm9%^@sZGVy:MT-35#$AxMDEwMTA=:ANSWE!RED");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsWithAnObjectShouldReturnFalse() {
|
public void equalsWithAnObjectShouldReturnFalse() {
|
||||||
// A MessageReference :
|
|
||||||
MessageReference m = new MessageReference();
|
MessageReference m = new MessageReference();
|
||||||
// And another Object :
|
|
||||||
Object o = new Object();
|
Object o = new Object();
|
||||||
// Asserting it is not equals, as not an instance of MessageReference:
|
|
||||||
assertFalse(m.equals(o));
|
assertFalse(m.equals(o));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsWithMessageReferenceContainingSameDataShouldReturnTrue() {
|
public void equalsWithMessageReferenceContainingSameDataShouldReturnTrue() {
|
||||||
// First MessageReference :
|
|
||||||
MessageReference m1 = new MessageReference();
|
MessageReference m1 = new MessageReference();
|
||||||
m1.accountUuid = "acc1";
|
m1.accountUuid = "acc1";
|
||||||
m1.folderName = "folder1";
|
m1.folderName = "folder1";
|
||||||
m1.uid = "uid1";
|
m1.uid = "uid1";
|
||||||
// Same MessageReference than m1 :
|
|
||||||
MessageReference m2 = new MessageReference();
|
MessageReference m2 = new MessageReference();
|
||||||
m2.accountUuid = "acc1";
|
m2.accountUuid = "acc1";
|
||||||
m2.folderName = "folder1";
|
m2.folderName = "folder1";
|
||||||
@ -108,10 +97,9 @@ public class MessageReferenceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsWithMessageReferenceContainingDifferentAccountUuidShouldReturnFalse() {
|
public void equalsWithMessageReferenceContainingDifferentAccountUuidShouldReturnFalse() {
|
||||||
// First MessageReference :
|
|
||||||
MessageReference m1 = new MessageReference();
|
MessageReference m1 = new MessageReference();
|
||||||
m1.accountUuid = "acc1";
|
m1.accountUuid = "acc1";
|
||||||
// A MessageReference with another accountUuid :
|
|
||||||
MessageReference m2 = new MessageReference();
|
MessageReference m2 = new MessageReference();
|
||||||
m2.accountUuid = "acc2";
|
m2.accountUuid = "acc2";
|
||||||
|
|
||||||
@ -121,10 +109,9 @@ public class MessageReferenceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsWithMessageReferenceContainingDifferentFolderNameShouldReturnFalse() {
|
public void equalsWithMessageReferenceContainingDifferentFolderNameShouldReturnFalse() {
|
||||||
// First MessageReference :
|
|
||||||
MessageReference m1 = new MessageReference();
|
MessageReference m1 = new MessageReference();
|
||||||
m1.folderName = "folder1";
|
m1.folderName = "folder1";
|
||||||
// A MessageReference with another folderName :
|
|
||||||
MessageReference m2 = new MessageReference();
|
MessageReference m2 = new MessageReference();
|
||||||
m2.folderName = "folder2";
|
m2.folderName = "folder2";
|
||||||
|
|
||||||
@ -134,10 +121,9 @@ public class MessageReferenceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsWithMessageReferenceContainingDifferentUidShouldReturnFalse() {
|
public void equalsWithMessageReferenceContainingDifferentUidShouldReturnFalse() {
|
||||||
// First MessageReference :
|
|
||||||
MessageReference m1 = new MessageReference();
|
MessageReference m1 = new MessageReference();
|
||||||
m1.uid = "uid1";
|
m1.uid = "uid1";
|
||||||
// A MessageReference with another uid :
|
|
||||||
MessageReference m2 = new MessageReference();
|
MessageReference m2 = new MessageReference();
|
||||||
m2.uid = "uid2";
|
m2.uid = "uid2";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user