summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs
new file mode 100644
index 00000000..41a8280c
--- /dev/null
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Bz28689.xaml.cs
@@ -0,0 +1,39 @@
+´╗┐using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+
+using NUnit.Framework;
+
+namespace Xamarin.Forms.Xaml.UnitTests
+{
+ public partial class Bz28689 : ContentPage
+ {
+ public Bz28689 ()
+ {
+ InitializeComponent ();
+ }
+
+ public Bz28689 (bool useCompiledXaml)
+ {
+ //this stub will be replaced at compile time
+ }
+
+ [TestFixture]
+ class Tests
+ {
+ [TestCase(true)]
+ [TestCase(false)]
+ public void XArrayInResources (bool useCompiledXaml)
+ {
+ var layout = new Bz28689 (useCompiledXaml);
+ var array = layout.Resources ["stringArray"];
+ Assert.That (array, Is.TypeOf<string[]> ());
+ var stringarray = (string[])array;
+ Assert.AreEqual (2, stringarray.Length);
+ Assert.AreEqual ("Test1", stringarray [0]);
+ Assert.AreEqual ("Test2", stringarray [1]);
+ }
+ }
+ }
+} \ No newline at end of file