@@ -15,6 +15,7 @@ public void Can_AddQueryParam()
15
15
Assert . That ( "http://example.com?s=rf&f=1" . AddQueryParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com?s=rf&f=1&f=2" ) ) ;
16
16
Assert . That ( "http://example.com?" . AddQueryParam ( "f" , "1" ) , Is . EqualTo ( "http://example.com?f=1" ) ) ;
17
17
Assert . That ( "http://example.com?f=1&" . AddQueryParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com?f=1&f=2" ) ) ;
18
+ Assert . That ( "http://example.com?ab=0" . AddQueryParam ( "a" , "1" ) , Is . EqualTo ( "http://example.com?ab=0&a=1" ) ) ;
18
19
}
19
20
20
21
[ Test ]
@@ -25,6 +26,7 @@ public void Can_SetQueryParam()
25
26
Assert . That ( "http://example.com?f=1" . SetQueryParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com?f=2" ) ) ;
26
27
Assert . That ( "http://example.com?s=0&f=1&s=1" . SetQueryParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com?s=0&f=2&s=1" ) ) ;
27
28
Assert . That ( "http://example.com?s=rf&f=1" . SetQueryParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com?s=rf&f=2" ) ) ;
29
+ Assert . That ( "http://example.com?ab=0" . SetQueryParam ( "a" , "1" ) , Is . EqualTo ( "http://example.com?ab=0&a=1" ) ) ;
28
30
}
29
31
30
32
[ Test ]
@@ -35,6 +37,7 @@ public void Can_AddHashParam()
35
37
Assert . That ( "http://example.com#f=1" . AddHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#f=1/f=2" ) ) ;
36
38
Assert . That ( "http://example.com#s=0/f=1/s=1" . AddHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#s=0/f=1/s=1/f=2" ) ) ;
37
39
Assert . That ( "http://example.com#s=rf/f=1" . AddHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#s=rf/f=1/f=2" ) ) ;
40
+ Assert . That ( "http://example.com#ab=0" . AddHashParam ( "a" , "1" ) , Is . EqualTo ( "http://example.com#ab=0/a=1" ) ) ;
38
41
}
39
42
40
43
[ Test ]
@@ -45,6 +48,7 @@ public void Can_SetHashParam()
45
48
Assert . That ( "http://example.com#f=1" . SetHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#f=2" ) ) ;
46
49
Assert . That ( "http://example.com#s=0/f=1/s=1" . SetHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#s=0/f=2/s=1" ) ) ;
47
50
Assert . That ( "http://example.com#s=rf/f=1" . SetHashParam ( "f" , "2" ) , Is . EqualTo ( "http://example.com#s=rf/f=2" ) ) ;
51
+ Assert . That ( "http://example.com#ab=0" . SetHashParam ( "a" , "1" ) , Is . EqualTo ( "http://example.com#ab=0/a=1" ) ) ;
48
52
}
49
53
}
50
54
}
0 commit comments