@@ -274,6 +274,23 @@ public void AndroidConfig()
274
274
BodyLocKey = "body-loc-key" ,
275
275
BodyLocArgs = new List < string > ( ) { "arg3" , "arg4" } ,
276
276
ChannelId = "channel-id" ,
277
+ Ticker = "ticker" ,
278
+ Sticky = false ,
279
+ EventTimestamp = DateTime . Parse ( "2020-06-27T16:29:06.032691000-04:00" ) ,
280
+ LocalOnly = true ,
281
+ Priority = NotificationPriority . HIGH ,
282
+ VibrateTimingsMillis = new long [ ] { 1000L , 1001L } ,
283
+ DefaultVibrateTimings = false ,
284
+ DefaultSound = true ,
285
+ LightSettings = new LightSettings ( )
286
+ {
287
+ Color = "#aabbccdd" ,
288
+ LightOnDurationMillis = 1002L ,
289
+ LightOffDurationMillis = 1003L ,
290
+ } ,
291
+ DefaultLightSettings = false ,
292
+ Visibility = NotificationVisibility . PUBLIC ,
293
+ NotificationCount = 10 ,
277
294
} ,
278
295
FcmOptions = new AndroidFcmOptions ( )
279
296
{
@@ -308,6 +325,33 @@ public void AndroidConfig()
308
325
{ "body_loc_key" , "body-loc-key" } ,
309
326
{ "body_loc_args" , new JArray ( ) { "arg3" , "arg4" } } ,
310
327
{ "channel_id" , "channel-id" } ,
328
+ { "ticker" , "ticker" } ,
329
+ { "sticky" , false } ,
330
+ { "local_only" , true } ,
331
+ { "default_vibrate_timings" , false } ,
332
+ { "default_sound" , true } ,
333
+ {
334
+ "light_settings" , new JObject ( )
335
+ {
336
+ { "light_on_duration" , "1.002000000s" } ,
337
+ { "light_off_duration" , "1.003000000s" } ,
338
+ {
339
+ "color" , new JObject ( )
340
+ {
341
+ { "red" , 0.6666667 } ,
342
+ { "green" , 0.733333349 } ,
343
+ { "blue" , 0.8 } ,
344
+ { "alpha" , 0.8666667 } ,
345
+ }
346
+ } ,
347
+ }
348
+ } ,
349
+ { "default_light_settings" , false } ,
350
+ { "notification_count" , 10 } ,
351
+ { "notification_priority" , "PRIORITY_HIGH" } ,
352
+ { "visibility" , "PUBLIC" } ,
353
+ { "vibrate_timings" , new JArray ( ) { "1s" , "1.001000000s" } } ,
354
+ { "event_time" , "2020-06-27T20:29:06.032691000Z" } ,
311
355
}
312
356
} ,
313
357
{
@@ -378,6 +422,7 @@ public void AndroidConfigDeserialization()
378
422
Notification = new AndroidNotification ( )
379
423
{
380
424
Title = "title" ,
425
+ EventTimestamp = DateTime . Parse ( "2020-06-27T20:29:06.032691000Z" ) ,
381
426
} ,
382
427
} ;
383
428
var json = NewtonsoftJsonSerializer . Instance . Serialize ( original ) ;
@@ -422,6 +467,23 @@ public void AndroidNotificationDeserialization()
422
467
BodyLocKey = "body-loc-key" ,
423
468
BodyLocArgs = new List < string > ( ) { "arg3" , "arg4" } ,
424
469
ChannelId = "channel-id" ,
470
+ Ticker = "ticker" ,
471
+ Sticky = false ,
472
+ EventTimestamp = DateTime . Parse ( "2020-06-27T16:29:06.032691000-04:00" ) ,
473
+ LocalOnly = true ,
474
+ Priority = NotificationPriority . HIGH ,
475
+ VibrateTimingsMillis = new long [ ] { 1000L , 1001L } ,
476
+ DefaultVibrateTimings = false ,
477
+ DefaultSound = true ,
478
+ LightSettings = new LightSettings ( )
479
+ {
480
+ Color = "#AABBCCDD" ,
481
+ LightOnDurationMillis = 1002L ,
482
+ LightOffDurationMillis = 1003L ,
483
+ } ,
484
+ DefaultLightSettings = false ,
485
+ Visibility = NotificationVisibility . PUBLIC ,
486
+ NotificationCount = 10 ,
425
487
} ;
426
488
var json = NewtonsoftJsonSerializer . Instance . Serialize ( original ) ;
427
489
var copy = NewtonsoftJsonSerializer . Instance . Deserialize < AndroidNotification > ( json ) ;
@@ -438,6 +500,20 @@ public void AndroidNotificationDeserialization()
438
500
Assert . Equal ( original . BodyLocKey , copy . BodyLocKey ) ;
439
501
Assert . Equal ( original . BodyLocArgs , copy . BodyLocArgs ) ;
440
502
Assert . Equal ( original . ChannelId , copy . ChannelId ) ;
503
+ Assert . Equal ( original . Ticker , copy . Ticker ) ;
504
+ Assert . Equal ( original . Sticky , copy . Sticky ) ;
505
+ Assert . Equal ( original . EventTimestamp , copy . EventTimestamp ) ;
506
+ Assert . Equal ( original . LocalOnly , copy . LocalOnly ) ;
507
+ Assert . Equal ( original . Priority , copy . Priority ) ;
508
+ Assert . Equal ( original . VibrateTimingsMillis , copy . VibrateTimingsMillis ) ;
509
+ Assert . Equal ( original . DefaultVibrateTimings , copy . DefaultVibrateTimings ) ;
510
+ Assert . Equal ( original . DefaultSound , copy . DefaultSound ) ;
511
+ Assert . Equal ( original . LightSettings . Color , copy . LightSettings . Color ) ;
512
+ Assert . Equal ( original . LightSettings . LightOnDurationMillis , copy . LightSettings . LightOnDurationMillis ) ;
513
+ Assert . Equal ( original . LightSettings . LightOffDurationMillis , copy . LightSettings . LightOffDurationMillis ) ;
514
+ Assert . Equal ( original . DefaultLightSettings , copy . DefaultLightSettings ) ;
515
+ Assert . Equal ( original . Visibility , copy . Visibility ) ;
516
+ Assert . Equal ( original . NotificationCount , copy . NotificationCount ) ;
441
517
}
442
518
443
519
[ Fact ]
0 commit comments