summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Xaml.UnitTests
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Xaml.UnitTests')
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/Issues/Issue1637.cs2
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs10
-rw-r--r--Xamarin.Forms.Xaml.UnitTests/TypeExtensionTests.cs7
3 files changed, 10 insertions, 9 deletions
diff --git a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1637.cs b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1637.cs
index f6083fb1..8fb1759a 100644
--- a/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1637.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/Issues/Issue1637.cs
@@ -10,7 +10,7 @@ namespace Xamarin.Forms.Xaml.UnitTests
public void ImplicitCollectionWithSingleElement ()
{
var xaml = @"
- <Grid>
+ <Grid xmlns=""http://xamarin.com/schemas/2014/forms"">
<Grid.RowDefinitions>
<RowDefinition Height=""*"" />
</Grid.RowDefinitions>
diff --git a/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs b/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
index f132b19c..4d3e004a 100644
--- a/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/LoaderTests.cs
@@ -381,9 +381,9 @@ namespace Xamarin.Forms.Xaml.UnitTests
[Test]
public void MissingStaticResourceShouldThrow ()
{
- var xaml = @"<Label Text=""{StaticResource foo}""/>";
+ var xaml = @"<Label xmlns=""http://xamarin.com/schemas/2014/forms"" Text=""{StaticResource foo}""/>";
var label = new Label ();
- Assert.Throws (new XamlParseExceptionConstraint (1, 8), () => label.LoadFromXaml (xaml));
+ Assert.Throws (new XamlParseExceptionConstraint (1, 54), () => label.LoadFromXaml (xaml));
}
public class CustView : Button
@@ -605,7 +605,7 @@ namespace Xamarin.Forms.Xaml.UnitTests
public void TestCollectionContentProperties ()
{
var xaml = @"
- <StackLayout>
+ <StackLayout xmlns=""http://xamarin.com/schemas/2014/forms"">
<Label Text=""Foo""/>
<Label Text=""Bar""/>
</StackLayout>";
@@ -619,7 +619,7 @@ namespace Xamarin.Forms.Xaml.UnitTests
public void TestCollectionContentPropertiesWithSingleElement ()
{
var xaml = @"
- <StackLayout>
+ <StackLayout xmlns=""http://xamarin.com/schemas/2014/forms"">
<Label Text=""Foo""/>
</StackLayout>";
var layout = new StackLayout ().LoadFromXaml (xaml);
@@ -796,7 +796,7 @@ namespace Xamarin.Forms.Xaml.UnitTests
public void StyleWithoutTargetTypeThrows ()
{
var xaml = @"
- <Label>
+ <Label xmlns=""http://xamarin.com/schemas/2014/forms"">
<Label.Style>
<Style>
<Setter Property=""Text"" Value=""Foo"" />
diff --git a/Xamarin.Forms.Xaml.UnitTests/TypeExtensionTests.cs b/Xamarin.Forms.Xaml.UnitTests/TypeExtensionTests.cs
index 49c4bb49..0eec655c 100644
--- a/Xamarin.Forms.Xaml.UnitTests/TypeExtensionTests.cs
+++ b/Xamarin.Forms.Xaml.UnitTests/TypeExtensionTests.cs
@@ -19,9 +19,10 @@ namespace Xamarin.Forms.Xaml.UnitTests
{
base.Setup ();
var nsManager = new XmlNamespaceManager (new NameTable ());
- nsManager.AddNamespace ("local", "clr-namespace:Xamarin.Forms.Xaml.UnitTests;assembly=Xamarin.Forms.Xaml.UnitTests");
- nsManager.AddNamespace ("sys", "clr-namespace:System;assembly=mscorlib");
- nsManager.AddNamespace ("x", "http://schemas.microsoft.com/winfx/2006/xaml");
+ nsManager.AddNamespace("", "http://xamarin.com/schemas/2014/forms");
+ nsManager.AddNamespace("local", "clr-namespace:Xamarin.Forms.Xaml.UnitTests;assembly=Xamarin.Forms.Xaml.UnitTests");
+ nsManager.AddNamespace("sys", "clr-namespace:System;assembly=mscorlib");
+ nsManager.AddNamespace("x", "http://schemas.microsoft.com/winfx/2006/xaml");
typeResolver = new Internals.XamlTypeResolver (nsManager, XamlParser.GetElementType, Assembly.GetCallingAssembly ());