@@ -1019,8 +1019,17 @@ public void TestObjectsGetUsersRequestQueryParam64 ()
10191019 TestObjectsGetUsersCommon ( true , true , true , 0 , "" , "" , false ) ;
10201020 }
10211021
1022-
10231022 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 ) {
10241033 string uuid = "customuuid" ;
10251034
10261035 Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1032,6 +1041,11 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
10321041 queryParams = null ;
10331042 }
10341043
1044+ string filter = "" ;
1045+ if ( withFilter ) {
1046+ filter = "name like 'abc - / s*'" ;
1047+ }
1048+
10351049 PNConfiguration pnConfiguration = new PNConfiguration ( ) ;
10361050 pnConfiguration . Origin = EditorCommon . Origin ;
10371051 pnConfiguration . SubscribeKey = EditorCommon . SubscribeKey ;
@@ -1052,10 +1066,10 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
10521066 incl = "" ;
10531067 }
10541068
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 ) ;
10561070
10571071 //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}" ,
10591073 ssl ? "s" : "" ,
10601074 pnConfiguration . Origin ,
10611075 EditorCommon . SubscribeKey ,
@@ -1066,7 +1080,8 @@ public void TestObjectsGetUsersCommon(bool ssl, bool sendQueryParams, bool withI
10661080 ( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
10671081 ( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
10681082 ( 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" : ""
10701085 ) ;
10711086
10721087 string received = uri . OriginalString ;
@@ -1457,8 +1472,17 @@ public void TestObjectsGetSpacesRequestQueryParam64 ()
14571472 TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false ) ;
14581473 }
14591474
1460-
1475+ [ Test ]
1476+ public void TestObjectsGetSpacesRequestWithFilterQueryParam64 ( )
1477+ {
1478+ TestObjectsGetSpacesCommon ( true , true , true , 0 , "" , "" , false , true ) ;
1479+ }
1480+
14611481 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 ) {
14621486 string uuid = "customuuid" ;
14631487
14641488 Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1490,10 +1514,16 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
14901514 incl = "" ;
14911515 }
14921516
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 ) ;
14941524
14951525 //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}" ,
14971527 ssl ? "s" : "" ,
14981528 pnConfiguration . Origin ,
14991529 EditorCommon . SubscribeKey ,
@@ -1504,7 +1534,8 @@ public void TestObjectsGetSpacesCommon(bool ssl, bool sendQueryParams, bool with
15041534 ( string . IsNullOrEmpty ( incl ) ) ? "" : string . Format ( "&include={0}" , incl ) ,
15051535 ( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
15061536 ( 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" : ""
15081539 ) ;
15091540
15101541 string received = uri . OriginalString ;
@@ -1897,6 +1928,17 @@ public void TestObjectsGetMembersRequestQueryParam64 ()
18971928
18981929
18991930 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 ) {
19001942 string uuid = "customuuid" ;
19011943
19021944 Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -1929,10 +1971,15 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
19291971 }
19301972 string ch = "ch" ;
19311973
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 ) ;
19331980
19341981 //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}" ,
19361983 ssl ? "s" : "" ,
19371984 pnConfiguration . Origin ,
19381985 EditorCommon . SubscribeKey ,
@@ -1944,7 +1991,8 @@ public void TestObjectsGetMembersCommon(bool ssl, bool sendQueryParams, bool wit
19441991 ( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
19451992 ( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
19461993 ( count ) ? "&count=1" : "&count=0" ,
1947- ch
1994+ ch ,
1995+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27abc%20-%20%2F%20s%27%2A" : ""
19481996 ) ;
19491997
19501998 string received = uri . OriginalString ;
@@ -2334,9 +2382,19 @@ public void TestObjectsGetMembershipsRequestQueryParam64 ()
23342382 {
23352383 TestObjectsGetMembershipsCommon ( true , true , true , 0 , "" , "" , false ) ;
23362384 }
2337-
23382385
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 ) {
23402398 string uuid = "customuuid" ;
23412399
23422400 Dictionary < string , string > queryParams = new Dictionary < string , string > ( ) ;
@@ -2368,11 +2426,16 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
23682426 incl = "" ;
23692427 }
23702428 string ch = "ch" ;
2429+
2430+ string filter = "name == 's1236 9'" ;
2431+ if ( ! withFilter ) {
2432+ filter = "" ;
2433+ }
23712434
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 ) ;
23732436
23742437 //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}" ,
23762439 ssl ? "s" : "" ,
23772440 pnConfiguration . Origin ,
23782441 EditorCommon . SubscribeKey ,
@@ -2384,7 +2447,8 @@ public void TestObjectsGetMembershipsCommon(bool ssl, bool sendQueryParams, bool
23842447 ( string . IsNullOrEmpty ( start ) ) ? "" : string . Format ( "&start={0}" , start ) ,
23852448 ( string . IsNullOrEmpty ( end ) ) ? "" : string . Format ( "&end={0}" , end ) ,
23862449 ( count ) ? "&count=1" : "&count=0" ,
2387- ch
2450+ ch ,
2451+ ( withFilter ) ? "&filter=name%20%3D%3D%20%27s1236%209%27" : ""
23882452 ) ;
23892453
23902454 string received = uri . OriginalString ;
0 commit comments