@@ -274,6 +274,23 @@ public void AndroidConfig()
274274 BodyLocKey = "body-loc-key" ,
275275 BodyLocArgs = new List < string > ( ) { "arg3" , "arg4" } ,
276276 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 = AndroidNotification . PriorityType . HIGH ,
282+ VibrateTimingsMillis = new long [ ] { 1000L , 1001L } ,
283+ DefaultVibrateTimings = false ,
284+ DefaultSound = true ,
285+ LightSettings = new LightSettings
286+ {
287+ Color = new LightSettingsColor { Red = 0.2f , Green = 0.4f , Blue = 0.6f } ,
288+ LightOnDurationMillis = 1002L ,
289+ LightOffDurationMillis = 1003L ,
290+ } ,
291+ DefaultLightSettings = false ,
292+ Visibility = AndroidNotification . VisibilityType . PUBLIC ,
293+ NotificationCount = 10 ,
277294 } ,
278295 FcmOptions = new AndroidFcmOptions ( )
279296 {
@@ -308,6 +325,23 @@ public void AndroidConfig()
308325 { "body_loc_key" , "body-loc-key" } ,
309326 { "body_loc_args" , new JArray ( ) { "arg3" , "arg4" } } ,
310327 { "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+ { "color" , "#336699" } , { "light_on_duration" , "1.002000000s" } , { "light_off_duration" , "1.003000000s" } ,
337+ }
338+ } ,
339+ { "default_light_settings" , false } ,
340+ { "notification_count" , 10 } ,
341+ { "notification_priority" , "PRIORITY_HIGH" } ,
342+ { "visibility" , "PUBLIC" } ,
343+ { "vibrate_timings" , new JArray ( ) { "1s" , "1.001000000s" } } ,
344+ { "event_time" , "2020-06-27T20:29:06.032691000Z" } ,
311345 }
312346 } ,
313347 {
@@ -378,6 +412,7 @@ public void AndroidConfigDeserialization()
378412 Notification = new AndroidNotification ( )
379413 {
380414 Title = "title" ,
415+ EventTimestamp = DateTime . Parse ( "2020-06-27T20:29:06.032691000Z" ) ,
381416 } ,
382417 } ;
383418 var json = NewtonsoftJsonSerializer . Instance . Serialize ( original ) ;
@@ -422,6 +457,23 @@ public void AndroidNotificationDeserialization()
422457 BodyLocKey = "body-loc-key" ,
423458 BodyLocArgs = new List < string > ( ) { "arg3" , "arg4" } ,
424459 ChannelId = "channel-id" ,
460+ Ticker = "ticker" ,
461+ Sticky = false ,
462+ EventTimestamp = DateTime . Parse ( "2020-06-27T16:29:06.032691000-04:00" ) ,
463+ LocalOnly = true ,
464+ Priority = AndroidNotification . PriorityType . HIGH ,
465+ VibrateTimingsMillis = new long [ ] { 1000L , 1001L } ,
466+ DefaultVibrateTimings = false ,
467+ DefaultSound = true ,
468+ LightSettings = new LightSettings
469+ {
470+ Color = new LightSettingsColor { Red = 0.2F , Green = 0.4F , Blue = 0.6F , Alpha = 1.0F } ,
471+ LightOnDurationMillis = 1002L ,
472+ LightOffDurationMillis = 1003L ,
473+ } ,
474+ DefaultLightSettings = false ,
475+ Visibility = AndroidNotification . VisibilityType . PUBLIC ,
476+ NotificationCount = 10 ,
425477 } ;
426478 var json = NewtonsoftJsonSerializer . Instance . Serialize ( original ) ;
427479 var copy = NewtonsoftJsonSerializer . Instance . Deserialize < AndroidNotification > ( json ) ;
@@ -438,6 +490,21 @@ public void AndroidNotificationDeserialization()
438490 Assert . Equal ( original . BodyLocKey , copy . BodyLocKey ) ;
439491 Assert . Equal ( original . BodyLocArgs , copy . BodyLocArgs ) ;
440492 Assert . Equal ( original . ChannelId , copy . ChannelId ) ;
493+ Assert . Equal ( original . Ticker , copy . Ticker ) ;
494+ Assert . Equal ( original . Sticky , copy . Sticky ) ;
495+ Assert . Equal ( original . EventTimestamp , copy . EventTimestamp ) ;
496+ Assert . Equal ( original . LocalOnly , copy . LocalOnly ) ;
497+ Assert . Equal ( original . Priority , copy . Priority ) ;
498+ Assert . Equal ( original . VibrateTimingsMillis , copy . VibrateTimingsMillis ) ;
499+ Assert . Equal ( original . DefaultVibrateTimings , copy . DefaultVibrateTimings ) ;
500+ Assert . Equal ( original . DefaultSound , copy . DefaultSound ) ;
501+ Assert . Equal ( original . LightSettings . Color . Red , copy . LightSettings . Color . Red ) ;
502+ Assert . Equal ( original . LightSettings . Color . Blue , copy . LightSettings . Color . Blue ) ;
503+ Assert . Equal ( original . LightSettings . Color . Green , copy . LightSettings . Color . Green ) ;
504+ Assert . Equal ( original . LightSettings . Color . Alpha , copy . LightSettings . Color . Alpha ) ;
505+ Assert . Equal ( original . DefaultLightSettings , copy . DefaultLightSettings ) ;
506+ Assert . Equal ( original . Visibility , copy . Visibility ) ;
507+ Assert . Equal ( original . NotificationCount , copy . NotificationCount ) ;
441508 }
442509
443510 [ Fact ]
0 commit comments