File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -336,6 +336,21 @@ public void BindToShouldntInitiallySetToNull()
336336 Assert . Equal ( vm . Model . AnotherThing , view . FakeControl . NullHatingString ) ;
337337 }
338338
339+ [ Fact ]
340+ public void BindToTypeConversionSmokeTest ( )
341+ {
342+ var vm = new PropertyBindViewModel ( ) ;
343+ var view = new PropertyBindView ( ) { ViewModel = null } ;
344+
345+ view . WhenAny ( x => x . ViewModel . JustADouble , x => x . Value )
346+ . BindTo ( view , x => x . FakeControl . NullHatingString ) ;
347+
348+ Assert . Equal ( "" , view . FakeControl . NullHatingString ) ;
349+
350+ view . ViewModel = vm ;
351+ Assert . Equal ( vm . JustADouble . ToString ( ) , view . FakeControl . NullHatingString ) ;
352+ }
353+
339354 void configureDummyServiceLocator ( )
340355 {
341356 var types = new Dictionary < Tuple < Type , string > , List < Type > > ( ) ;
You can’t perform that action at this time.
0 commit comments