1 package org.apache.maven.surefire.util;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import junit.framework.TestCase;
23
24 import java.util.Arrays;
25 import java.util.HashMap;
26 import java.util.List;
27 import java.util.Map;
28
29
30
31
32 public class ScanResultTest
33 extends TestCase
34 {
35 public void testWriteTo()
36 throws Exception
37 {
38 List<String> files = Arrays.asList( "abc", "cde" );
39 DefaultScanResult scanResult = new DefaultScanResult( files );
40 Map<String, String> serialized = new HashMap<String, String>();
41 scanResult.writeTo( serialized );
42
43 DefaultScanResult read = DefaultScanResult.from( serialized );
44 List files1 = read.getFiles();
45 assertEquals( 2, files1.size() );
46 assertTrue( files1.contains( "abc" ) );
47 assertTrue( files1.contains( "cde" ) );
48 }
49 }