1 36 package org.columba.ristretto.imap; 37 38 import junit.framework.TestCase; 39 40 46 public class MessageSetTest extends TestCase { 47 48 52 public MessageSetTest(String arg0) { 53 super(arg0); 54 } 55 56 public void testParse() { 57 Integer [] uids = { 58 new Integer (0) ,new Integer (1),new Integer (2),new Integer (3), 59 new Integer (7) ,new Integer (10) 60 }; 61 62 MessageSet set = new MessageSet(uids); 63 64 String result = set.getString(); 65 assertTrue( result.equals("0:3,7,10")); 66 } 67 68 public void testParse2() { 69 Integer [] uids = { 70 new Integer (0) ,new Integer (1),new Integer (2),new Integer (3), 71 new Integer (7) ,new Integer (8) ,new Integer (11) ,new Integer (9) 72 }; 73 74 MessageSet set = new MessageSet(uids); 75 76 String result = set.getString(); 77 assertTrue( result.equals("0:3,7:9,11")); 78 } 79 80 public void testParse3() { 81 Integer [] uids = { 82 new Integer (0) ,new Integer (1),new Integer (2),new Integer (3), 83 new Integer (7) ,new Integer (8) ,new Integer (10) ,new Integer (9) 84 }; 85 86 MessageSet set = new MessageSet(uids); 87 88 String result = set.getString(); 89 assertTrue( result.equals("0:3,7:10")); 90 } 91 92 } 93 | Popular Tags |