1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

add unit test

This commit is contained in:
Art O Cathain 2014-10-11 11:54:26 +01:00
parent 668ee71b6c
commit dd1ec5f47b

View File

@ -0,0 +1,28 @@
package com.fsck.k9.mail.internet;
import com.fsck.k9.helper.Utility;
import junit.framework.TestCase;
import java.io.Serializable;
import java.util.LinkedList;
public class UtilityTest extends TestCase {
public void testToSerializableList() {
LinkedList<String> input = new LinkedList<String>(Arrays.asList("a", "b"));
Serializable serializableList = Utility.toSerializableList(input);
assertEquals(serializableList, input);
}
public void testToSerializableListAlreadySerializable() {
ArrayList<String> input = new ArrayList<String>(Arrays.asList("a", "b"));
Serializable serializableList = Utility.toSerializableList(input);
assertSame(serializableList, input);
}
}