@@ -350,6 +350,54 @@ public void FromObjectDictionary_does_Convert_long_to_TimeSpan()
350
350
var dtoLong = map . FromObjectDictionary < ModelWithLong > ( ) ;
351
351
Assert . That ( dtoLong . Time , Is . EqualTo ( time . Ticks ) ) ;
352
352
}
353
+
354
+ public enum CefLogSeverity
355
+ {
356
+ Default ,
357
+ Verbose ,
358
+ Debug = Verbose ,
359
+ Info ,
360
+ Warning ,
361
+ Error ,
362
+ ErrorReport ,
363
+ Disable = 99 ,
364
+ }
365
+
366
+ public class CefSettings
367
+ {
368
+ public CefLogSeverity LogSeverity { get ; set ; }
369
+ }
370
+
371
+ public class CefConfig
372
+ {
373
+ public string WindowTitle { get ; set ; }
374
+ public string Icon { get ; set ; }
375
+ public string CefPath { get ; set ; }
376
+ public string [ ] Args { get ; set ; }
377
+ public CefSettings CefSettings { get ; set ; }
378
+ public string StartUrl { get ; set ; }
379
+ public int ? X { get ; set ; }
380
+ public int ? Y { get ; set ; }
381
+ public int Width { get ; set ; }
382
+ public int Height { get ; set ; }
383
+ public bool CenterToScreen { get ; set ; }
384
+ public bool HideConsoleWindow { get ; set ; }
385
+ }
386
+
387
+ [ Test ]
388
+ public void Can_use_PopulateInstance_to_populate_enum ( )
389
+ {
390
+ var map = new Dictionary < string , object > {
391
+ [ "LogSeverity" ] = "Verbose"
392
+ } ;
393
+
394
+ var config = new CefConfig { CefSettings = new CefSettings { LogSeverity = CefLogSeverity . Info } } ;
395
+ map . PopulateInstance ( config . CefSettings ) ;
396
+
397
+ Assert . That ( config . CefSettings . LogSeverity , Is . EqualTo ( CefLogSeverity . Verbose ) ) ;
398
+ }
399
+
400
+
353
401
}
354
402
355
403
0 commit comments