@@ -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 > ( ) ;
@@ -1032,6 +1041,11 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1032
1041
queryParams = null ;
1033
1042
}
1034
1043
1044
+ string filter = "" ;
1045
+ if ( withFilter ) {
1046
+ filter = "name like 'abc - / s*'" ;
1047
+ }
1048
+
1035
1049
PNConfiguration pnConfiguration = new PNConfiguration ( ) ;
1036
1050
pnConfiguration . Origin = EditorCommon . Origin ;
1037
1051
pnConfiguration . SubscribeKey = EditorCommon . SubscribeKey ;
@@ -1052,10 +1066,10 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1052
1066
incl = "" ;
1053
1067
}
1054
1068
1055
- Uri uri = BuildRequests . BuildObjectsGetUsersRequest ( limit , start , end , count , incl , pnUnity , queryParams ) ;
1069
+ Uri uri = BuildRequests . BuildObjectsGetUsersRequest ( limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1056
1070
1057
1071
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1058
- 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}" ,
1059
1073
ssl ? "s" : "" ,
1060
1074
pnConfiguration . Origin ,
1061
1075
EditorCommon . SubscribeKey ,
@@ -1066,7 +1080,8 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
1066
1080
( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
1067
1081
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1068
1082
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1069
- ( count ) ? "&count=1" : "&count=0"
1083
+ ( count ) ? "&count=1" : "&count=0" ,
1084
+ ( withFilter ) ? "&filter=name%20like%20%27abc%20-%20%2F%20s%2A%27" : ""
1070
1085
) ;
1071
1086
1072
1087
string received = uri . OriginalString ;
@@ -1457,8 +1472,17 @@ public void TestObjectsGetSpacesRequestQueryParam64 ()
1457
1472
TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false ) ;
1458
1473
}
1459
1474
1460
-
1475
+ [ Test ]
1476
+ public void TestObjectsGetSpacesRequestWithFilterQueryParam64 ( )
1477
+ {
1478
+ TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false , true ) ;
1479
+ }
1480
+
1461
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 ) {
1462
1486
string uuid = "customuuid" ;
1463
1487
1464
1488
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1490,10 +1514,16 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
1490
1514
incl = "" ;
1491
1515
}
1492
1516
1493
- Uri uri = BuildRequests . BuildObjectsGetSpacesRequest ( limit , start , end , count , incl , pnUnity , queryParams ) ;
1517
+ string filter = "" ;
1518
+ if ( withFilter ) {
1519
+ filter = "name == 'abc - / s*'" ;
1520
+ }
1521
+
1522
+
1523
+ Uri uri = BuildRequests . BuildObjectsGetSpacesRequest ( limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1494
1524
1495
1525
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1496
- 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}" ,
1497
1527
ssl ? "s" : "" ,
1498
1528
pnConfiguration . Origin ,
1499
1529
EditorCommon . SubscribeKey ,
@@ -1504,7 +1534,8 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
1504
1534
( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
1505
1535
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1506
1536
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1507
- ( 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" : ""
1508
1539
) ;
1509
1540
1510
1541
string received = uri . OriginalString ;
@@ -1897,6 +1928,17 @@ public void TestObjectsGetMembersRequestQueryParam64 ()
1897
1928
1898
1929
1899
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 ) {
1900
1942
string uuid = "customuuid" ;
1901
1943
1902
1944
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1929,10 +1971,15 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
1929
1971
}
1930
1972
string ch = "ch" ;
1931
1973
1932
- Uri uri = BuildRequests . BuildObjectsGetMembersRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams ) ;
1974
+ string filter = "" ;
1975
+ if ( withFilter ) {
1976
+ filter = "name == 'abc - / s'*" ;
1977
+ }
1978
+
1979
+ Uri uri = BuildRequests . BuildObjectsGetMembersRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
1933
1980
1934
1981
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
1935
- 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}" ,
1936
1983
ssl ? "s" : "" ,
1937
1984
pnConfiguration . Origin ,
1938
1985
EditorCommon . SubscribeKey ,
@@ -1944,7 +1991,8 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
1944
1991
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
1945
1992
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
1946
1993
( count ) ? "&count=1" : "&count=0" ,
1947
- ch
1994
+ ch ,
1995
+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27abc%20-%20%2F%20s%27%2A" : ""
1948
1996
) ;
1949
1997
1950
1998
string received = uri . OriginalString ;
@@ -2334,9 +2382,19 @@ public void TestObjectsGetMembershipsRequestQueryParam64 ()
2334
2382
{
2335
2383
TestObjectsGetMembershipsCommon ( true , true , true , 0 , "" , "" , false ) ;
2336
2384
}
2337
-
2338
2385
2339
- 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 ) {
2340
2398
string uuid = "customuuid" ;
2341
2399
2342
2400
Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -2368,11 +2426,16 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
2368
2426
incl = "" ;
2369
2427
}
2370
2428
string ch = "ch" ;
2429
+
2430
+ string filter = "name == 's1236 9'" ;
2431
+ if ( ! withFilter ) {
2432
+ filter = "" ;
2433
+ }
2371
2434
2372
- Uri uri = BuildRequests . BuildObjectsGetMembershipsRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams ) ;
2435
+ Uri uri = BuildRequests . BuildObjectsGetMembershipsRequest ( ch , limit , start , end , count , incl , pnUnity , queryParams , filter ) ;
2373
2436
2374
2437
//https://ps.pndsn.com/v1/objects/demo/spaces/UnityUnitTests_86?uuid=customuuid&pnsdk=PubNub-CSharp-UnityOSX%2F4.3.0
2375
- 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}" ,
2376
2439
ssl ? "s" : "" ,
2377
2440
pnConfiguration . Origin ,
2378
2441
EditorCommon . SubscribeKey ,
@@ -2384,7 +2447,8 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
2384
2447
( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
2385
2448
( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
2386
2449
( count ) ? "&count=1" : "&count=0" ,
2387
- ch
2450
+ ch ,
2451
+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27s1236%209%27" : ""
2388
2452
) ;
2389
2453
2390
2454
string received = uri . OriginalString ;
0 commit comments