blob: 657c6ffe3f87f12208efaee501e6870b4faad97b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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>());
}
}
}
}
|