@@ -1019,8 +1019,17 @@ public void TestObjectsGetUsersRequestQueryParam64 ()
1019
1019
TestObjectsGetUsersCommon ( true , true , true , 0 , "" , "" , false ) ;
1020
1020
}
1021
1021
1022
-
1023
1022
public void TestObjectsGetUsersCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count ) {
1023
+ TestObjectsGetUsersCommon ( ssl , sendQueryParams , withIncl , limit , start , end , count , false ) ;
1024
+ }
1025
+
1026
+ [ Test ]
1027
+ public void TestObjectsGetUsersRequestWithFilterQueryParam64 ( )
1028
+ {
1029
+ TestObjectsGetUsersCommon ( true , true , true , 0 , "" , "" , false , true ) ;
1030
+ }
1031
+
1032
+ public void TestObjectsGetUsersCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count , bool withFilter ) {
1024
1033
string uuid = "customuuid" ;
1025
1034
1026
1035
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1033,6 +1042,9 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1033
1042
}
1034
1043
1035
1044
string filter = "" ;
1045
+ if ( withFilter ) {
1046
+ filter = "name like 'abc - / s*'" ;
1047
+ }
1036
1048
1037
1049
PNConfiguration pnConfiguration = new PNConfiguration ( ) ;
1038
1050
pnConfiguration . Origin = EditorCommon . Origin ;
@@ -1057,7 +1069,7 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1057
1069
Uri uri = BuildRequests . BuildObjectsGetUsersRequest ( limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1058
1070
1059
1071
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1060
- string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/users?uuid={3}{7}{10}{4}{8}{9}&pnsdk={5}{6}" ,
1072
+ string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/users?uuid={3}{7}{10}{11}{ 4}{8}{9}&pnsdk={5}{6}" ,
1061
1073
ssl ? "s" : "" ,
1062
1074
pnConfiguration . Origin ,
1063
1075
EditorCommon . SubscribeKey ,
@@ -1068,7 +1080,8 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1068
1080
( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
1069
1081
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1070
1082
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1071
- ( count ) ? "&count=1" : "&count=0"
1083
+ ( count ) ? "&count=1" : "&count=0" ,
1084
+ ( withFilter ) ? "&filter=name%20like%20%27abc%20-%20%2F%20s%2A%27" : ""
1072
1085
) ;
1073
1086
1074
1087
string received = uri . OriginalString ;
@@ -1459,8 +1472,17 @@ public void TestObjectsGetSpacesRequestQueryParam64 ()
1459
1472
TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false ) ;
1460
1473
}
1461
1474
1462
-
1475
+ [ Test ]
1476
+ public void TestObjectsGetSpacesRequestWithFilterQueryParam64 ( )
1477
+ {
1478
+ TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false , true ) ;
1479
+ }
1480
+
1463
1481
public void TestObjectsGetSpacesCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count ) {
1482
+ TestObjectsGetSpacesCommon ( ssl , sendQueryParams , withIncl , limit , start , end , count , false ) ;
1483
+ }
1484
+
1485
+ public void TestObjectsGetSpacesCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count , bool withFilter ) {
1464
1486
string uuid = "customuuid" ;
1465
1487
1466
1488
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1493,11 +1515,15 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
1493
1515
}
1494
1516
1495
1517
string filter = "" ;
1518
+ if ( withFilter ) {
1519
+ filter = "name == 'abc - / s*'" ;
1520
+ }
1521
+
1496
1522
1497
1523
Uri uri = BuildRequests . BuildObjectsGetSpacesRequest ( limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1498
1524
1499
1525
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1500
- string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/spaces?uuid={3}{7}{10}{4}{8}{9}&pnsdk={5}{6}" ,
1526
+ string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/spaces?uuid={3}{7}{10}{11}{ 4}{8}{9}&pnsdk={5}{6}" ,
1501
1527
ssl ? "s" : "" ,
1502
1528
pnConfiguration . Origin ,
1503
1529
EditorCommon . SubscribeKey ,
@@ -1508,7 +1534,8 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
1508
1534
( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
1509
1535
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1510
1536
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1511
- ( count ) ? "&count=1" : "&count=0"
1537
+ ( count ) ? "&count=1" : "&count=0" ,
1538
+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27abc%20-%20%2F%20s%2A%27" : ""
1512
1539
) ;
1513
1540
1514
1541
string received = uri . OriginalString ;
@@ -1901,6 +1928,17 @@ public void TestObjectsGetMembersRequestQueryParam64 ()
1901
1928
1902
1929
1903
1930
public void TestObjectsGetMembersCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count ) {
1931
+ TestObjectsGetMembersCommon ( ssl , sendQueryParams , withIncl , limit , start , end , count , false ) ;
1932
+ }
1933
+
1934
+ [ Test ]
1935
+ public void TestObjectsGetMembersRequestWithFilterQueryParam64 ( )
1936
+ {
1937
+ TestObjectsGetMembersCommon ( true , true , true , 0 , "" , "" , false , true ) ;
1938
+ }
1939
+
1940
+
1941
+ public void TestObjectsGetMembersCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count , bool withFilter ) {
1904
1942
string uuid = "customuuid" ;
1905
1943
1906
1944
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1934,11 +1972,14 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
1934
1972
string ch = "ch" ;
1935
1973
1936
1974
string filter = "" ;
1975
+ if ( withFilter ) {
1976
+ filter = "name == 'abc - / s'*" ;
1977
+ }
1937
1978
1938
1979
Uri uri = BuildRequests . BuildObjectsGetMembersRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1939
1980
1940
1981
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1941
- string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/spaces/{11}/users?uuid={3}{7}{10}{4}{8}{9}&pnsdk={5}{6}" ,
1982
+ string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/spaces/{11}/users?uuid={3}{7}{10}{12}{ 4}{8}{9}&pnsdk={5}{6}" ,
1942
1983
ssl ? "s" : "" ,
1943
1984
pnConfiguration . Origin ,
1944
1985
EditorCommon . SubscribeKey ,
@@ -1950,7 +1991,8 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
1950
1991
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1951
1992
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1952
1993
( count ) ? "&count=1" : "&count=0" ,
1953
- ch
1994
+ ch ,
1995
+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27abc%20-%20%2F%20s%27%2A" : ""
1954
1996
) ;
1955
1997
1956
1998
string received = uri . OriginalString ;
@@ -2340,9 +2382,19 @@ public void TestObjectsGetMembershipsRequestQueryParam64 ()
2340
2382
{
2341
2383
TestObjectsGetMembershipsCommon ( true , true , true , 0 , "" , "" , false ) ;
2342
2384
}
2343
-
2344
2385
2345
- public void TestObjectsGetMembershipsCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count ) {
2386
+ public void TestObjectsGetMembershipsCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count ) {
2387
+ TestObjectsGetMembershipsCommon ( ssl , sendQueryParams , withIncl , limit , start , end , count , false ) ;
2388
+ }
2389
+
2390
+
2391
+ [ Test ]
2392
+ public void TestObjectsGetMembershipsRequestWithFilterQueryParam64 ( )
2393
+ {
2394
+ TestObjectsGetMembershipsCommon ( true , true , true , 0 , "" , "" , false , true ) ;
2395
+ }
2396
+
2397
+ public void TestObjectsGetMembershipsCommon ( bool ssl , bool sendQueryParams , bool withIncl , int limit , string start , string end , bool count , bool withFilter ) {
2346
2398
string uuid = "customuuid" ;
2347
2399
2348
2400
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -2374,12 +2426,16 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
2374
2426
incl = "" ;
2375
2427
}
2376
2428
string ch = "ch" ;
2377
- string filter = "" ;
2429
+
2430
+ string filter = "name == 's1236 9'" ;
2431
+ if ( ! withFilter ) {
2432
+ filter = "" ;
2433
+ }
2378
2434
2379
2435
Uri uri = BuildRequests . BuildObjectsGetMembershipsRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
2380
2436
2381
2437
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
2382
- string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/users/{11}/spaces?uuid={3}{7}{10}{4}{8}{9}&pnsdk={5}{6}" ,
2438
+ string expected = string . Format ( "http{0}://{1}/v1/objects/{2}/users/{11}/spaces?uuid={3}{7}{10}{12}{ 4}{8}{9}&pnsdk={5}{6}" ,
2383
2439
ssl ? "s" : "" ,
2384
2440
pnConfiguration . Origin ,
2385
2441
EditorCommon . SubscribeKey ,
@@ -2391,7 +2447,8 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
2391
2447
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
2392
2448
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
2393
2449
( count ) ? "&count=1" : "&count=0" ,
2394
- ch
2450
+ ch ,
2451
+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27s1236%209%27" : ""
2395
2452
) ;
2396
2453
2397
2454
string received = uri . OriginalString ;
0 commit comments