diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-12-04 22:08:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-04 22:08:11 +0100 |
commit | 39f2deb5e04886374e720013782c751a4bb7675d (patch) | |
tree | 64f2df7230760c26533730e73821a6dc5c7607da /Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs | |
parent | fb76107f4f3294a9d32c6983bc742ce8dff60cd8 (diff) | |
download | xamarin-forms-39f2deb5e04886374e720013782c751a4bb7675d.tar.gz xamarin-forms-39f2deb5e04886374e720013782c751a4bb7675d.tar.bz2 xamarin-forms-39f2deb5e04886374e720013782c751a4bb7675d.zip |
[Xaml] support arrays as x:Arguments (#545)
* [Xaml] port some FactoryMethod tests to XamlC
* [Xaml] support array parameters in factory ctors
* [XamlC] support arrays as x:Arguments
* fix build
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs')
-rw-r--r-- | Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs index 9fa4e924..f5790383 100644 --- a/Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs +++ b/Xamarin.Forms.Xaml.UnitTests/FactoryMethods.xaml.cs @@ -32,6 +32,11 @@ namespace Xamarin.Forms.Xaml.UnitTests Content = "int ctor " + arg.ToString (); } + public MockFactory(object [] args) + { + Content = string.Join(" ", args); + } + public static MockFactory ParameterlessFactory () { return new MockFactory { @@ -138,6 +143,14 @@ namespace Xamarin.Forms.Xaml.UnitTests var layout = new FactoryMethods(useCompiledXaml); Assert.AreEqual("alternate ctor Property", layout.v7.Content.Content); } + + [TestCase(false)] + [TestCase(true)] + public void TestCtorWithArrayParameter(bool useCompiledXaml) + { + var layout = new FactoryMethods(useCompiledXaml); + Assert.AreEqual("Foo Bar", layout.v8.Content.Content); + } } } }
\ No newline at end of file |