blob: cf1b02940ca233afe792714ca69e88bc2ad70203 (
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
38
|
using NUnit.Framework;
using Xamarin.Forms;
namespace Xamarin.Forms.Xaml.UnitTests
{
public class FakeView : View
{
public string NonBindable { get; set; }
}
[XamlCompilation(XamlCompilationOptions.Skip)]
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)
{
if (!useCompiledXaml)
Assert.Throws(new XamlParseExceptionConstraint(10, 13), () => new SetterOnNonBP(useCompiledXaml));
else
Assert.Throws(new XamlParseExceptionConstraint(10, 13), () => MockCompiler.Compile(typeof(SetterOnNonBP)));
}
}
}
}
|