summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/Validation/SetterOnNonBP.xaml.cs
blob: f6d8ffea0d4971b33d8bf9b10746e78a657faa89 (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
using NUnit.Framework;

using Xamarin.Forms;
namespace Xamarin.Forms.Xaml.UnitTests
{	
	public class FakeVisualElement : VisualElement
	{
		public string NonBindable { get; set; }
	}

	public partial class SetterOnNonBP : ContentPage
	{	
		public SetterOnNonBP ()
		{
			InitializeComponent ();
		}

		public SetterOnNonBP (bool useCompiledXaml)
		{
			//this stub will be replaced at compile time
		}
			
		[TestFixture]
		public class SetterOnNonBPTests
		{
			[TestCase (false)]
			[TestCase (true)]
			public void ShouldThrow (bool useCompiledXaml)
			{
				Assert.Throws (new XamlParseExceptionConstraint (10, 13), () => new SetterOnNonBP (useCompiledXaml));
			}
		}
	}
}