1 package org.apache.maven.scm.provider.accurev.util;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import static org.hamcrest.Matchers.hasEntry;
23 import static org.hamcrest.Matchers.is;
24 import static org.junit.Assert.assertThat;
25
26 import java.util.Map;
27
28 import org.junit.Test;
29
30 public class QuotedPropertyParserTest
31 {
32
33 @Test
34 public void testname()
35 throws Exception
36 {
37
38 Map<String, String> result =
39 QuotedPropertyParser.parse( "param1=one&\"\"param2='2'&\"myK\"ey='my&\"value'¶m3=3" );
40
41 assertThat( result, hasEntry( "param1", "one" ) );
42 assertThat( result, hasEntry( "param2", "2" ) );
43 assertThat( result, hasEntry( "myKey", "my&\"value" ) );
44 assertThat( result, hasEntry( "param3", "3" ) );
45 assertThat( "3 entries", result.size(), is( 4 ) );
46
47 }
48 }