summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs53
1 files changed, 53 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs
new file mode 100644
index 00000000..ff2dac08
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Unreported004.xaml.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using NUnit.Framework;
+using Xamarin.Forms;
+
+namespace Xamarin.Forms.Xaml.UnitTests
+{
+ public partial class Unreported004 : ContentPage
+ {
+ public Unreported004()
+ {
+ InitializeComponent();
+ }
+
+ public Unreported004(bool useCompiledXaml)
+ {
+ //this stub will be replaced at compile time
+ }
+
+ public static readonly BindableProperty SomePropertyProperty =
+ BindableProperty.Create("SomeProperty", typeof(string),
+ typeof(Unreported004), null);
+
+ public static string GetSomeProperty(BindableObject bindable)
+ {
+ return bindable.GetValue(SomePropertyProperty) as string;
+ }
+
+ public static string GetSomeProperty(BindableObject bindable, object foo)
+ {
+ return null;
+ }
+
+ public static void SetSomeProperty(BindableObject bindable, string value)
+ {
+ bindable.SetValue(SomePropertyProperty, value);
+ }
+
+
+ [TestFixture]
+ class Tests
+ {
+ [TestCase(true), TestCase(false)]
+ public void MultipleGetMethodsAllowed(bool useCompiledXaml)
+ {
+ var page = new Unreported004();
+ Assert.NotNull(page.label);
+ Assert.AreEqual("foo", GetSomeProperty(page.label));
+ }
+ }
+ }
+}
+