diff options
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues/Unreported006.xaml.cs')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/Issues/Unreported006.xaml.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported006.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported006.xaml.cs new file mode 100644 index 00000000..657c6ffe --- /dev/null +++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported006.xaml.cs @@ -0,0 +1,37 @@ +using NUnit.Framework; + +namespace Xamarin.Forms.Xaml.UnitTests +{ + public partial class Unreported006 : ContentPage + { + public Unreported006() + { + InitializeComponent(); + } + + public Unreported006(bool useCompiledXaml) + { + //this stub will be replaced at compile time + } + + public Layout<View> GenericProperty { + get { return (Layout<View>)GetValue(GenericPropertyProperty); } + set { SetValue(GenericPropertyProperty, value); } + } + + public static readonly BindableProperty GenericPropertyProperty = + BindableProperty.Create(nameof(GenericProperty), typeof(Layout<View>), typeof(Unreported006)); + + [TestFixture] + class Tests + { + [TestCase(true), TestCase(false)] + public void CanAssignGenericBP(bool useCompiledXaml) + { + var page = new Unreported006(); + Assert.NotNull(page.GenericProperty); + Assert.That(page.GenericProperty, Is.TypeOf<StackLayout>()); + } + } + } +}
\ No newline at end of file |