1 | void testCreateFlatListWithGroups() {↵ | | 1 | void testCreateFlatListWithNamesOnly() {↵
|
2 | List<String> l = new Vector<String>();↵ | | 2 | List<String> l = new Vector<String>();↵
|
3 | l.add("groupname1");↵ | | 3 | l.add("name1");↵
|
4 | l.add("name2@mail.org");↵ | | 4 | l.add("name2");↵
|
|
5 | List<String> result = ListBuilder.createFlatList(l);↵ | | 5 | List<String> result = ListBuilder.createFlatList(l);↵
|
6 | // first group contains first contact item↵ | | 6 | ↵
|
7 | assertEquals("name1@mail.org", result.get(0));↵ | | 7 | assertEquals("name1@mail.org", result.get(0));↵
|
8 | assertEquals("name2@mail.org", result.get(1));↵ | | 8 | assertEquals("name2@mail.org", result.get(1));↵
|
|
9 | }↵ | | 9 | }↵
|
10 | ↵ | | |
|
11 | /**↵ | | 10 | /**↵
|
12 | * Again, but with a group containing two contact items↵ | | 11 | * ↵
|
13 | *↵ | | 12 | Now, mix in real email address↵
|
14 | */↵ | | 13 | */↵
|
15 | public void testCreateFlatListWithGroups2() {↵ | | 14 | public void testCreateFlatListWithEmailAddressMixedIn() {↵
|
16 | List<String> l = new Vector<String>();↵ | | 15 | List<String> l = new Vector<String>();↵
|
17 | l.add("groupname2");↵ | | 16 | l.add("name1");↵
|
18 | l.add("name2@mail.org");↵ | | 17 | l.add("name2@mail.org");↵
|
|
19 | List<String> result = ListBuilder.createFlatList(l);↵ | | 18 | List<String> result = ListBuilder.createFlatList(l);↵
|
20 | // first group contains first contact item↵ | | 19 | ↵
|
21 | assertEquals("name1@mail.org", result.get(0));↵ | | 20 | assertEquals("name1@mail.org", result.get(0));↵
|
22 | assertEquals("name2@mail.org", result.get(1)) | | 21 | assertEquals("name2@mail.org", result.get(1))
|