diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-12-23 08:50:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 08:50:19 +0100 |
commit | b96df000db76ba3490589c37e93224271249bc88 (patch) | |
tree | 6389cd652ebe395b51829ee2ec1d41d285ed2fab /Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs | |
parent | 2c91b0facd2a25d0de9a283b44cf818329d4c06f (diff) | |
download | xamarin-forms-b96df000db76ba3490589c37e93224271249bc88.tar.gz xamarin-forms-b96df000db76ba3490589c37e93224271249bc88.tar.bz2 xamarin-forms-b96df000db76ba3490589c37e93224271249bc88.zip |
[Xaml] support short Properties for PropertyCondition (#645)
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs index 79886f8f..5b6755f5 100644 --- a/Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/TriggerTests.xaml.cs @@ -47,6 +47,22 @@ namespace Xamarin.Forms.Xaml.UnitTests Assert.AreEqual (Entry.IsPasswordProperty, pwTrigger.Property); Assert.AreEqual (true, pwTrigger.Value); } + + [TestCase(false)] + [TestCase(true)] + public void ValueIsConvertedWithPropertyCondition(bool useCompiledXaml) + { + var layout = new TriggerTests(useCompiledXaml); + Entry entry = layout.entry1; + Assert.NotNull(entry); + + var triggers = entry.Triggers; + Assert.IsNotEmpty(triggers); + var pwTrigger = triggers[0] as MultiTrigger; + var pwCondition = pwTrigger.Conditions[0] as PropertyCondition; + Assert.AreEqual(Entry.IsPasswordProperty, pwCondition.Property); + Assert.AreEqual(true, pwCondition.Value); + } } } }
\ No newline at end of file |